home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 8 / The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO / prg_casm / recio215.zip / SPEC.TXT < prev    next >
Text File  |  1996-10-26  |  97KB  |  3,179 lines

  1.     Title: SPECIFICATION OF C LANGUAGE RECIO LIBRARY
  2. Copyright: (C) 1994-1996, William Pierpoint
  3.   Version: 2.15
  4.      Date: October 26, 1996
  5.  
  6.  
  7.  
  8. 1.0 RECORD INPUT/OUTPUT <recio.h>
  9.  
  10.  
  11. 1.1 Introduction
  12.  
  13. The header <recio.h> declares two types, several macros, and many functions
  14. for performing line oriented input and output.
  15.  
  16.  
  17. 1.1.1 Record Streams
  18.  
  19. Input and output are mapped into logical data record streams.  A record
  20. stream is an ordered sequence of characters composed into records, each
  21. record consisting of zero or more characters plus a terminating record
  22. delimiter character.  The terminating record delimiter for a file is the
  23. newline character.
  24.  
  25. Each record consists of zero or more fields.  The record may be broken
  26. into fields in two different ways: (1) character delimited and (2) column
  27. delimited.  For character delimited fields, each field consists of zero or
  28. more characters plus a terminating field delimiter character or, for the
  29. last field in the record, the record delimiter character.  For column
  30. delimited fields, each field consists of one or more characters delimited
  31. by a single column position for fields consisting of one character, or by
  32. beginning and ending column positions for fields consisting of one or more
  33. characters.
  34.  
  35. Four types of fields are defined: (1) character, (2) text, (3) numeric, and
  36. (4) time.  A character field consists of a single character.  A text field
  37. consists of a sequence of zero or more characters delimited at each end by an
  38. optional text delimiter character.  A numeric field consists of a sequence of
  39. one or more characters from the set of valid characters for the number type
  40. (integral or floating point) and radix.  A time field consists of a sequence
  41. of one or more characters from the set of valid characters for the time type,
  42. delimited according to a specified format string.
  43.  
  44.  
  45. 1.1.2 Types
  46.  
  47. The types are
  48.  
  49.     REC
  50.  
  51. which is an object type capable of recording all information needed to
  52. control a record stream used for line oriented input or output, including
  53. its file pointer, pointers to its associated record and field buffers, field
  54. and text delimiting characters, an error indicator that records whether
  55. an error has occurred, and an end-of-file indicator that records whether
  56. the end of the file has been reached; and
  57.  
  58.     rpos_t
  59.  
  60. which is an object type capable of recording all the information needed to
  61. specify uniquely any field position within a record.
  62.  
  63.  
  64. 1.1.3 Macros
  65.  
  66. The macros are
  67.  
  68.     RECBUFSIZ
  69.     FLDBUFSIZ
  70.  
  71. which expand to integral constant expressions, which are the initial
  72. sizes of the record buffer and the field buffer;
  73.  
  74.     RECFLDCH
  75.     RECTXTCH
  76.  
  77. which expand to integral constant expressions, which are the default
  78. values of the characters used to separate the fields and delimit text
  79. in a record and whose default value shall correspond to the value of
  80. the space character;
  81.  
  82.     RECBEGYR
  83.  
  84. which expands to an integral constant expression, which is the default
  85. 4-digit value for the beginning year corresponding to the beginning
  86. year of the 2-digit time format;
  87.  
  88.     ROPEN_MAX
  89.  
  90. which expands to an integral constant expression that is the maximum
  91. number of files that can be open simultaneously;
  92.  
  93.     RECIN
  94.     RECOUT
  95.     RECERR
  96.  
  97. which expand to an integral constant expression that is the context
  98. number for the recin record stream that gets input from the <stdio.h>
  99. standard input stream stdin, the recout record stream that puts output
  100. to the <stdio.h> standard output stream stdout, and the recerr record
  101. stream that puts output to the <stdio.h> standard error stream stderr.
  102.  
  103.  
  104. 1.1.4 Expressions
  105.  
  106. The expressions are
  107.  
  108.     recin
  109.     recout
  110.     recerr
  111.  
  112. which are of type "pointer to REC" that points to the REC object associated
  113. with the <stdio.h> FILE objects stdin (standard input stream), stdout
  114. (standard output stream), and stderr (standard error stream).  The recin,
  115. recout, and recerr record streams are always open and are included in the
  116. count of ROPEN_MAX.
  117.  
  118.  
  119.  
  120. 1.2 Record Access Functions
  121.  
  122. 1.2.1 The rclose Function
  123.  
  124. Synopsis
  125.  
  126.      #include <recio.h>
  127.      void rclose(REC *rp);
  128.  
  129. Description
  130.  
  131. The rclose function causes the record stream pointed to by rp and the
  132. associated file to be closed.  Any unread data is discarded.  The record
  133. stream is disassociated from the file.  If associated buffers were
  134. automatically allocated, they are deallocated.
  135.  
  136. If an error occurs, the error indicator for the record stream is set and
  137. the callback error function is called.
  138.  
  139. Returns
  140.  
  141. The rclose function returns no value.
  142.  
  143.  
  144. 1.2.2 The rcloseall Function
  145.  
  146. Synopsis
  147.  
  148.      #include <recio.h>
  149.      int rcloseall(void);
  150.  
  151. Description
  152.  
  153. The rcloseall function causes all the open record streams, and all the
  154. files associated with the open record streams, to be closed.  Any unread
  155. data is discarded.  Each record stream is disassociated from its file.
  156. If associated buffers were automatically allocated, they are deallocated.
  157.  
  158. Returns
  159.  
  160. The rcloseall function returns the number of record streams successfully
  161. closed.
  162.  
  163.  
  164. 1.2.3 The ropen Function
  165.  
  166. Synopsis
  167.  
  168.      #include <recio.h>
  169.      REC *ropen(const char *filename, const char *mode);
  170.  
  171. Description
  172.  
  173. The ropen function opens the file whose name is the string pointed to by
  174. filename, and associates a record stream with it.  The argument mode
  175. points to a string whose first letter is:
  176.  
  177.        "r" - open text file for input
  178.        "w" - open text file for output
  179.        "a" - open text file for append
  180.  
  181. When successfully opened, the error and end-of-file indicators for the
  182. record stream are clear.  If an error occurs, errno is set to one of the
  183. error reporting macros as defined in <errno.h>, the callback error function
  184. is called (except when the file associated with filename is not able to be
  185. opened), and a null pointer is returned.
  186.  
  187. Returns
  188.  
  189. The ropen function returns a pointer to the object controlling the record
  190. stream.  If the open operation fails, ropen returns a null pointer.
  191.  
  192.  
  193. 1.2.4 The rsetfldsiz Function
  194.  
  195. Synopsis
  196.  
  197.      #include <recio.h>
  198.      void rsetfldsiz(REC *rp, size_t fldsize);
  199.  
  200. Description
  201.  
  202. The rsetfldsiz function reallocates the field buffer associated with the
  203. record stream pointed to by rp to the new size of fldsize.
  204.  
  205. The rsetfldsiz function may be used only after the record stream pointed
  206. to by rp has been opened and before any data is read into the record
  207. buffer.  Data is read into the record buffer by the function rgetrec,
  208. or by calling a function that either skips a field or gets data from a
  209. field.  If rsetfldsiz is not used, the initial size of the field buffer
  210. is set by the value of the macro FLDBUFSIZ.
  211.  
  212. If an error occurs, the error indicator for the record stream is set and
  213. the callback error function is called.
  214.  
  215. Returns
  216.  
  217. The rsetfldsiz function returns no value.
  218.  
  219.  
  220. 1.2.5 The rsetrecsiz Function
  221.  
  222. Synopsis
  223.  
  224.      #include <recio.h>
  225.      void rsetrecsiz(REC *rp, size_t recsize);
  226.  
  227. Description
  228.  
  229. The rsetrecsiz function reallocates the record buffer associated with the
  230. record stream pointed to by rp to the new size of recsize.
  231.  
  232. The rsetrecsiz function may be used only after the record stream pointed
  233. to by rp has been opened and before any data is read into the record
  234. buffer.  Data is read into the record buffer by the function rgetrec,
  235. or by calling a function that either skips a field or gets data from a
  236. field.  If rsetrecsiz is not used, the initial size of the field buffer
  237. is set by the value of the macro RECBUFSIZ.
  238.  
  239. If an error occurs, the error indicator for the record stream is set and
  240. the callback error function is called.
  241.  
  242. Returns
  243.  
  244. The rsetrecsiz function returns no value.
  245.  
  246.  
  247.  
  248. 1.3 Character Delimited Field Input Functions
  249.  
  250. The character delimited field input functions use a character (such as
  251. a comma or space) to determine where each field begins and ends.
  252.  
  253.  
  254. 1.3.1 The rbgeti Function
  255.  
  256. Synopsis
  257.  
  258.      #include <recio.h>
  259.      int rbgeti(REC *rp, int base);
  260.  
  261. Description
  262.  
  263. The rbgeti function reads a field consisting of one integral number
  264. represented by the radix determined by the value of base from the input
  265. record stream pointed to by rp.  Any leading or trailing white space
  266. in the field is ignored.
  267.  
  268. Base may be zero or in the range of 2 to 36 inclusive.  If the value of
  269. base is zero, the expected form of the integral number is described by
  270. section 3.1.3.2 of ANSI X3.159-1989.
  271.  
  272. If an error occurs, the error indicator for the record stream is set,
  273. the callback error function is called, and the function returns zero.
  274.  
  275. Returns
  276.  
  277. The rbgeti function returns a signed integer from the input record
  278. stream pointed to by rp.  If an attempt is made to read beyond the
  279. end-of-record, if the field is empty, or if there is an illegal character
  280. in the field, the error indicator for the record stream is set, and rbgeti
  281. returns zero.  If the record stream is at end-of-file (end-of-file indicator
  282. set), rbgeti returns zero.  If a previous error has occurred on the record
  283. stream that has not been cleared (error indicator set), rbgeti returns zero.
  284.  
  285.  
  286. 1.3.2 The rbgetl Function
  287.  
  288. Synopsis
  289.  
  290.      #include <recio.h>
  291.      long rbgetl(REC *rp, int base);
  292.  
  293. Description
  294.  
  295. The rbgetl function reads a field consisting of one integral number
  296. represented by the radix determined by the value of base from the input
  297. record stream pointed to by rp.  Any leading or trailing white space
  298. in the field is ignored.
  299.  
  300. Base may be zero or in the range of 2 to 36 inclusive.  If the value of
  301. base is zero, the expected form of the integral number is described by
  302. section 3.1.3.2 of ANSI X3.159-1989.
  303.  
  304. If an error occurs, the error indicator for the record stream is set,
  305. the callback error function is called, and the function returns zero (0L).
  306.  
  307. Returns
  308.  
  309. The rbgetl function returns a signed long from the input record stream
  310. pointed to by rp.  If an attempt is made to read beyond the end-of-record,
  311. if the field is empty, or if there is an illegal character in the field,
  312. the error indicator for the record stream is set, and rbgetl returns zero
  313. (0L).  If the record stream is at end-of-file (end-of-file indicator set),
  314. rbgetl returns zero (0L).  If a previous error has occurred on the record
  315. stream that has not been cleared (error indicator set), rbgetl returns
  316. zero (0L).
  317.  
  318.  
  319. 1.3.3 The rbgetui Function
  320.  
  321. Synopsis
  322.  
  323.      #include <recio.h>
  324.      unsigned int rbgetui(REC *rp, int base);
  325.  
  326. Description
  327.  
  328. The rbgetui function reads a field consisting of one non-negative integral
  329. number represented by the radix determined by the value of base from the
  330. input record stream pointed to by rp.  Any leading or trailing white space
  331. in the field is ignored.
  332.  
  333. Base may be zero or in the range of 2 to 36 inclusive.  If the value of
  334. base is zero, the expected form of the integral number is described by
  335. section 3.1.3.2 of ANSI X3.159-1989.
  336.  
  337. If an error occurs, the error indicator for the record stream is set,
  338. the callback error function is called, and the function returns zero.
  339.  
  340. Returns
  341.  
  342. The rbgetui function returns an unsigned integer from the input record
  343. stream pointed to by rp.  If an attempt is made to read beyond the
  344. end-of-record, if the field is empty, or if there is an illegal character
  345. in the field, the error indicator for the record stream is set, and rbgetui
  346. returns zero.  If the record stream is at end-of-file (end-of-file indicator
  347. set), rbgetui returns zero.  If a previous error has occurred on the record
  348. stream that has not been cleared (error indicator set), rbgetui returns zero.
  349.  
  350.  
  351. 1.3.4 The rbgetul Function
  352.  
  353. Synopsis
  354.  
  355.      #include <recio.h>
  356.      unsigned long rbgetul(REC *rp, int base);
  357.  
  358. Description
  359.  
  360. The rbgetul function reads a field consisting of one non-negative integral
  361. number represented by the radix determined by the value of base from the
  362. input record stream pointed to by rp.  Any leading or trailing white space
  363. in the field is ignored.
  364.  
  365. Base may be zero or in the range of 2 to 36 inclusive.  If the value of
  366. base is zero, the expected form of the integral number is described by
  367. section 3.1.3.2 of ANSI X3.159-1989.
  368.  
  369. If an error occurs, the error indicator for the record stream is set,
  370. the callback error function is called, and the function returns zero (0L).
  371.  
  372. Returns
  373.  
  374. The rbgetul function returns an unsigned long from the input record stream
  375. pointed to by rp.  If an attempt is made to read beyond the end-of-record,
  376. if the field is empty, or if there is an illegal character in the field,
  377. the error indicator for the record stream is set, and rbgetul returns zero
  378. (0L).  If the record stream is at end-of-file (end-of-file indicator set),
  379. rbgetul returns zero (0L).  If a previous error has occurred on the record
  380. stream that has not been cleared (error indicator set), rbgetul returns
  381. zero (0L).
  382.  
  383.  
  384. 1.3.5 The rgetc Function
  385.  
  386. Synopsis
  387.  
  388.      #include <recio.h>
  389.      int rgetc(REC *rp);
  390.  
  391. Description
  392.  
  393. The rgetc function reads a field consisting of one non-white space
  394. character from the input record stream pointed to by rp.  Any leading
  395. or trailing white space in the field is ignored.
  396.  
  397. If an error occurs, the error indicator for the record stream is set,
  398. the callback error function is called, and the function returns EOF.
  399.  
  400. Returns
  401.  
  402. The rgetc function returns a character from a single non-white
  403. space character field in the input record stream pointed to by rp.
  404. If an attempt is made to read beyond the end-of-record, or if there
  405. is more than or less than one non-white character in the field, the
  406. error indicator for the record stream is set, and rgetc returns EOF.  If the
  407. record stream is at end-of-file (end-of-file indicator set), rgetc returns
  408. EOF.  If a previous error has occurred on the record stream that has not been
  409. cleared (error indicator set), rgetc returns EOF.
  410.  
  411.  
  412. 1.3.6 The rgetd Function
  413.  
  414. Synopsis
  415.  
  416.      #include <recio.h>
  417.      double rgetd(REC *rp);
  418.  
  419. Description
  420.  
  421. The rgetd function reads a field consisting of one floating point
  422. number from the input record stream pointed to by rp.  Any leading
  423. or trailing white space in the field is ignored.
  424.  
  425. If an error occurs, the error indicator for the record stream is set,
  426. the callback error function is called, and the function returns zero.
  427.  
  428. Returns
  429.  
  430. The rgetd function returns a double precision floating point number
  431. from the input record stream pointed to by rp.  If an attempt is made
  432. to read beyond the end-of-record, if the field is empty, or if there
  433. is an illegal character in the field, the error indicator for the
  434. record stream is set, and rgetd returns zero (0.0).  If the record stream is
  435. at end-of-file (end-of-file indicator set), rgetd returns zero (0.0).  If a
  436. previous error has occurred on the record stream that has not been cleared
  437. (error indicator set), rgetd returns zero (0.0).
  438.  
  439.  
  440. 1.3.7 The rgetf Function
  441.  
  442. Synopsis
  443.  
  444.      #include <recio.h>
  445.      float rgetf(REC *rp);
  446.  
  447. Description
  448.  
  449. The rgetf function reads a field consisting of one floating point
  450. number from the input record stream pointed to by rp.  Any leading
  451. or trailing white space in the field is ignored.
  452.  
  453. If an error occurs, the error indicator for the record stream is set,
  454. the callback error function is called, and the function returns zero.
  455.  
  456. Returns
  457.  
  458. The rgetf function returns a single precision floating point number
  459. from the input record stream pointed to by rp.  If an attempt is made
  460. to read beyond the end-of-record, if the field is empty, or if there
  461. is an illegal character in the field, the error indicator for the
  462. record stream is set, and rgetf returns zero (0.0).  If the record stream is
  463. at end-of-file (end-of-file indicator set), rgetf returns zero (0.0).  If a
  464. previous error has occurred on the record stream that has not been cleared
  465. (error indicator set), rgetf returns zero (0.0).
  466.  
  467.  
  468. 1.3.8 The rgeti Function
  469.  
  470. Synopsis
  471.  
  472.      #include <recio.h>
  473.      int rgeti(REC *rp);
  474.  
  475. Description
  476.  
  477. The rgeti function reads a field consisting of one integral
  478. number from the input record stream pointed to by rp.  Any leading
  479. or trailing white space in the field is ignored.
  480.  
  481. If an error occurs, the error indicator for the record stream is set,
  482. the callback error function is called, and the function returns zero.
  483.  
  484. Returns
  485.  
  486. The rgeti function returns a signed integer from the input record
  487. stream pointed to by rp.  If an attempt is made to read beyond the
  488. end-of-record, if the field is empty, or if there is an illegal character
  489. in the field, the error indicator for the record stream is set, and rgeti
  490. returns zero.  If the record stream is at end-of-file (end-of-file indicator
  491. set), rgeti returns zero.  If a previous error has occurred on the record
  492. stream that has not been cleared (error indicator set), rgeti returns zero.
  493.  
  494.  
  495. 1.3.9 The rgetl Function
  496.  
  497. Synopsis
  498.  
  499.      #include <recio.h>
  500.      long rgetl(REC *rp);
  501.  
  502. Description
  503.  
  504. The rgetl function reads a field consisting of one integral number
  505. from the input record stream pointed to by rp.  Any leading or trailing
  506. white space in the field is ignored.
  507.  
  508. If an error occurs, the error indicator for the record stream is set,
  509. the callback error function is called, and the function returns zero (0L).
  510.  
  511. Returns
  512.  
  513. The rgetl function returns a signed long from the input record stream
  514. pointed to by rp.  If an attempt is made to read beyond the end-of-record,
  515. if the field is empty, or if there is an illegal character in the field,
  516. the error indicator for the record stream is set, and rgetl returns zero
  517. (0L).  If the record stream is at end-of-file (end-of-file indicator set),
  518. rgetl returns zero (0L).  If a previous error has occurred on the record
  519. stream that has not been cleared (error indicator set), rgetl returns zero
  520. (0L).
  521.  
  522.  
  523. 1.3.10 The rgets Function
  524.  
  525. Synopsis
  526.  
  527.      #include <recio.h>
  528.      char *rgets(REC *rp);
  529.  
  530. Description
  531.  
  532. The rgets function reads a field consisting of one text string from the
  533. input record stream pointed to by rp.  Any leading white space before the
  534. text delimiter and any trailing white space after the text delimiter in
  535. the field is ignored.  The text delimiters are not returned as part of
  536. the string.
  537.  
  538. If an error occurs, the error indicator for the record stream is set, the
  539. callback error function is called, and the function returns a pointer to
  540. an empty string.
  541.  
  542. Returns
  543.  
  544. The rgets function returns a pointer to a character array from the input
  545. record stream pointed to by rp.  If an attempt is made to read beyond the
  546. end-of-record, the error indicator for the record stream is set, and rgets
  547. returns a pointer to an empty string.  If the record stream is at end-of-file
  548. (end-of-file indicator set), rgets returns a pointer to an empty string.  If
  549. a previous error has occurred on the record stream that has not been cleared
  550. (error indicator set), rgets returns a pointer to an empty string.
  551.  
  552.  
  553. 1.3.11 The rgett Function
  554.  
  555. Synopsis
  556.  
  557.      #include <recio.h>
  558.      time_t rgett(REC *rp);
  559.  
  560. Description
  561.  
  562. The rgett function reads a field consisting of one time of type time_t from
  563. input record stream pointed to by rp.  Any leading or trailing white space
  564. in the field is ignored.
  565.  
  566. If an error occurs, the error indicator for the record stream is set, the
  567. callback error function is called, and the function returns (time_t)-1.
  568.  
  569. Returns
  570.  
  571. The rgett function returns a time of type time_t.  If an attempt is made to
  572. read beyond the end-of-record, the error indicator for the record stream is
  573. set, and rgett returns (time_t)-1.  If the record stream is at end-of-file
  574. (end-of-file indicator set), rgett returns (time_t)-1.  If a previous error
  575. has occurred on the record stream that has not been cleared (error indicator
  576. set), rgett returns (time_t)-1.
  577.  
  578.  
  579. 1.3.12 The rgettm Function
  580.  
  581. Synopsis
  582.  
  583.      #include <recio.h>
  584.      struct tm rgettm(REC *rp);
  585.  
  586. Description
  587.  
  588. The rgettm function reads a field consisting of one time of type struct tm
  589. from input record stream pointed to by rp.  Any leading or trailing white
  590. space in the field is ignored.
  591.  
  592. If an error occurs, the error indicator for the record stream is set, the
  593. callback error function is called, and the function returns an implementation
  594. defined value.
  595.  
  596. Returns
  597.  
  598. The rgettm function returns a time of type struct tm.  If an attempt is made
  599. to read beyond the end-of-record, the error indicator for the record stream
  600. is set, and rgettm returns an implementation defined value.  If the record
  601. stream is at end-of-file (end-of-file indicator set), rgettm returns an
  602. implementation defined value.  If a previous error has occurred on the
  603. record stream that has not been cleared (error indicator set), rgettm returns
  604. an implementation defined value.
  605.  
  606.  
  607. 1.3.13 The rgetui Function
  608.  
  609. Synopsis
  610.  
  611.      #include <recio.h>
  612.      unsigned int rgetui(REC *rp);
  613.  
  614. Description
  615.  
  616. The rgetui function reads a field consisting of one non-negative
  617. integral number from the input record stream pointed to by rp.  Any
  618. leading or trailing white space in the field is ignored.
  619.  
  620. If an error occurs, the error indicator for the record stream is set,
  621. the callback error function is called, and the function returns zero.
  622.  
  623. Returns
  624.  
  625. The rgetui function returns an unsigned integer from the input record
  626. stream pointed to by rp.  If an attempt is made to read beyond the
  627. end-of-record, if the field is empty, or if there is an illegal character
  628. in the field, the error indicator for the record stream is set, and rgetui
  629. returns zero.  If the record stream is at end-of-file (end-of-file indicator
  630. set), rgetui returns zero.  If a previous error has occurred on the record
  631. stream that has not been cleared (error indicator set), rgetui returns zero.
  632.  
  633.  
  634. 1.3.14 The rgetul Function
  635.  
  636. Synopsis
  637.  
  638.      #include <recio.h>
  639.      unsigned long rgetul(REC *rp);
  640.  
  641. Description
  642.  
  643. The rgetul function reads a field consisting of one non-negative
  644. integral number from the input record stream pointed to by rp.  Any
  645. leading or trailing white space in the field is ignored.
  646.  
  647. If an error occurs, the error indicator for the record stream is set, the
  648. callback error function is called, and the function returns zero (0L).
  649.  
  650. Returns
  651.  
  652. The rgetul function returns an unsigned long from the input record stream
  653. pointed to by rp.  If an attempt is made to read beyond the end-of-record,
  654. if the field is empty, or if there is an illegal character in the field,
  655. the error indicator for the record stream is set, and rgetul returns zero
  656. (0L).  If the record stream is at end-of-file (end-of-file indicator set),
  657. rgetul returns zero (0L).  If a previous error has occurred on the record
  658. stream that has not been cleared (error indicator set), rgetul returns zero
  659. (0L).
  660.  
  661.  
  662. 1.3.15 The rgotofld Function
  663.  
  664. Synopsis
  665.  
  666.      #include <recio.h>
  667.      void rgotofld(REC *rp, unsigned int num);
  668.  
  669. Description
  670.  
  671. The rgotofld function goes to the num number of the field for the record
  672. stream pointed to by rp.  The first field in the record is number 1,
  673. the second field is number 2, etc.
  674.  
  675. If an error occurs, the error indicator for the record stream is set and
  676. the callback error function is called.
  677.  
  678. Returns
  679.  
  680. The rgotofld function returns no value.
  681.  
  682.  
  683. 1.3.16 The ristxtfld Function
  684.  
  685. Synopsis
  686.  
  687.     #include <recio.h>
  688.     unsigned ristxtfld(REC *rp);
  689.  
  690. Description
  691.  
  692. The ristxtfld function determines if the current field (the field most
  693. recently input or output) for the record stream pointed to by rp was
  694. quoted with the text delimiter character (provided the text delimiter
  695. character is not the space character).
  696.  
  697. Returns
  698.  
  699. The ristxtfld function returns non-zero if the current field was quoted
  700. and returns zero otherwise.  If the text delimiter character for the stream
  701. is the space character, the ristxtfld function always returns zero.
  702.  
  703. 1.3.17 The rnbgeti Function
  704.  
  705. Synopsis
  706.  
  707.      #include <recio.h>
  708.      int rnbgeti(REC *rp, unsigned int num, int base);
  709.  
  710. Description
  711.  
  712. The rnbgeti function reads a field consisting of one integral number
  713. represented by the radix determined by the value of base from field number
  714. num for the input record stream pointed to by rp.  Any leading or trailing
  715. white space in the field is ignored.
  716.  
  717. The first field in a record is field number 1, the second field is field
  718. number 2, etc.
  719.  
  720. Base may be zero or in the range of 2 to 36 inclusive.  If the value of
  721. base is zero, the expected form of the integral number is described by
  722. section 3.1.3.2 of ANSI X3.159-1989.
  723.  
  724. If an error occurs, the error indicator for the record stream is set,
  725. the callback error function is called, and the function returns zero.
  726.  
  727. Returns
  728.  
  729. The rnbgeti function returns a signed integer from the input record
  730. stream pointed to by rp.  If an attempt is made to read beyond the
  731. end-of-record, if the field is empty, or if there is an illegal character
  732. in the field, the error indicator for the record stream is set, and rnbgeti
  733. returns zero.  If the record stream is at end-of-file (end-of-file indicator
  734. set), rnbgeti returns zero.  If a previous error has occurred on the record
  735. stream that has not been cleared (error indicator set), rnbgeti returns zero.
  736.  
  737.  
  738. 1.3.18 The rnbgetl Function
  739.  
  740. Synopsis
  741.  
  742.      #include <recio.h>
  743.      long rnbgetl(REC *rp, unsigned int num, int base);
  744.  
  745. Description
  746.  
  747. The rnbgetl function reads a field consisting of one integral number
  748. represented by the radix determined by the value of base from field
  749. number num for the input record stream pointed to by rp.  Any leading
  750. or trailing white space in the field is ignored.
  751.  
  752. The first field in a record is field number 1, the second field is field
  753. number 2, etc.
  754.  
  755. Base may be zero or in the range of 2 to 36 inclusive.  If the value of
  756. base is zero, the expected form of the integral number is described by
  757. section 3.1.3.2 of ANSI X3.159-1989.
  758.  
  759. If an error occurs, the error indicator for the record stream is set,
  760. the callback error function is called, and the function returns zero (0L).
  761.  
  762. Returns
  763.  
  764. The rnbgetl function returns a signed long from the input record stream
  765. pointed to by rp.  If an attempt is made to read beyond the end-of-record,
  766. if the field is empty, or if there is an illegal character in the field,
  767. the error indicator for the record stream is set, and rnbgetl returns zero
  768. (0L).  If the record stream is at end-of-file (end-of-file indicator set),
  769. rnbgetl returns zero (0L).  If a previous error has occurred on the record
  770. stream that has not been cleared (error indicator set), rnbgetl returns
  771. zero (0L).
  772.  
  773.  
  774. 1.3.19 The rnbgetui Function
  775.  
  776. Synopsis
  777.  
  778.      #include <recio.h>
  779.      unsigned int rnbgetui(REC *rp, unsigned int num, int base);
  780.  
  781. Description
  782.  
  783. The rnbgetui function reads a field consisting of one non-negative integral
  784. number represented by the radix determined by the value of base from the
  785. field number num for the input record stream pointed to by rp.  Any leading
  786. or trailing white space in the field is ignored.
  787.  
  788. The first field in a record is field number 1, the second field is field
  789. number 2, etc.
  790.  
  791. Base may be zero or in the range of 2 to 36 inclusive.  If the value of
  792. base is zero, the expected form of the integral number is described by
  793. section 3.1.3.2 of ANSI X3.159-1989.
  794.  
  795. If an error occurs, the error indicator for the record stream is set,
  796. the callback error function is called, and the function returns zero.
  797.  
  798. Returns
  799.  
  800. The rnbgetui function returns an unsigned integer from the input record
  801. stream pointed to by rp.  If an attempt is made to read beyond the
  802. end-of-record, if the field is empty, or if there is an illegal character
  803. in the field, the error indicator for the record stream is set, and rnbgetui
  804. returns zero.  If the record stream is at end-of-file (end-of-file indicator
  805. set), rnbgetui returns zero.  If a previous error has occurred on the record
  806. stream that has not been cleared (error indicator set), rnbgetui returns zero.
  807.  
  808.  
  809. 1.3.20 The rnbgetul Function
  810.  
  811. Synopsis
  812.  
  813.      #include <recio.h>
  814.      unsigned long rnbgetul(REC *rp, unsigned int num, int base);
  815.  
  816. Description
  817.  
  818. The rnbgetul function reads a field consisting of one non-negative integral
  819. number represented by the radix determined by the value of base from the
  820. field number num for the input record stream pointed to by rp.  Any leading
  821. or trailing white space in the field is ignored.
  822.  
  823. The first field in a record is field number 1, the second field is field
  824. number 2, etc.
  825.  
  826. Base may be zero or in the range of 2 to 36 inclusive.  If the value of
  827. base is zero, the expected form of the integral number is described by
  828. section 3.1.3.2 of ANSI X3.159-1989.
  829.  
  830. If an error occurs, the error indicator for the record stream is set,
  831. the callback error function is called, and the function returns zero (0L).
  832.  
  833. Returns
  834.  
  835. The rnbgetul function returns an unsigned long from the input record stream
  836. pointed to by rp.  If an attempt is made to read beyond the end-of-record,
  837. if the field is empty, or if there is an illegal character in the field,
  838. the error indicator for the record stream is set, and rnbgetul returns zero
  839. (0L).  If the record stream is at end-of-file (end-of-file indicator set),
  840. rnbgetul returns zero (0L).  If a previous error has occurred on the record
  841. stream that has not been cleared (error indicator set), rnbgetul returns
  842. zero (0L).
  843.  
  844.  
  845. 1.3.21 The rngetc Function
  846.  
  847. Synopsis
  848.  
  849.      #include <recio.h>
  850.      int rngetc(REC *rp, unsigned int num);
  851.  
  852. Description
  853.  
  854. The rngetc function reads a field consisting of one non-white space
  855. character from the field number num for the input record stream pointed
  856. to by rp.  Any leading or trailing white space in the field is ignored.
  857.  
  858. The first field in a record is field number 1, the second field is field
  859. number 2, etc.
  860.  
  861. If an error occurs, the error indicator for the record stream is set,
  862. the callback error function is called, and the function returns EOF.
  863.  
  864. Returns
  865.  
  866. The rngetc function returns a character from a single non-white
  867. space character field in the input record stream pointed to by rp.
  868. If an attempt is made to read beyond the end-of-record, or if there
  869. is more than or less than one non-white character in the field, the
  870. error indicator for the record stream is set, and rngetc returns EOF.  If the
  871. record stream is at end-of-file (end-of-file indicator set), rngetc returns
  872. EOF.  If a previous error has occurred on the record stream that has not been
  873. cleared (error indicator set), rngetc returns EOF.
  874.  
  875.  
  876. 1.3.22 The rngetd Function
  877.  
  878. Synopsis
  879.  
  880.      #include <recio.h>
  881.      double rngetd(REC *rp, unsigned int num);
  882.  
  883. Description
  884.  
  885. The rngetd function reads a field consisting of one floating point
  886. number from the field number num for the input record stream pointed
  887. to by rp.  Any leading or trailing white space in the field is ignored.
  888.  
  889. The first field in a record is field number 1, the second field is field
  890. number 2, etc.
  891.  
  892. If an error occurs, the error indicator for the record stream is set,
  893. the callback error function is called, and the function returns zero.
  894.  
  895. Returns
  896.  
  897. The rngetd function returns a double precision floating point number
  898. from the input record stream pointed to by rp.  If an attempt is made
  899. to read beyond the end-of-record, if the field is empty, or if there
  900. is an illegal character in the field, the error indicator for the
  901. record stream is set, and rngetd returns zero (0.0).  If the record stream is
  902. at end-of-file (end-of-file indicator set), rngetd returns zero (0.0).  If a
  903. previous error has occurred on the record stream that has not been cleared
  904. (error indicator set), rngetd returns zero (0.0).
  905.  
  906.  
  907. 1.3.23 The rngetf Function
  908.  
  909. Synopsis
  910.  
  911.      #include <recio.h>
  912.      float rngetf(REC *rp, unsigned int num);
  913.  
  914. Description
  915.  
  916. The rngetf function reads a field consisting of one floating point
  917. number from the field number num for the input record stream pointed
  918. to by rp.  Any leading or trailing white space in the field is ignored.
  919.  
  920. The first field in a record is field number 1, the second field is field
  921. number 2, etc.
  922.  
  923. If an error occurs, the error indicator for the record stream is set,
  924. the callback error function is called, and the function returns zero.
  925.  
  926. Returns
  927.  
  928. The rngetf function returns a single precision floating point number
  929. from the input record stream pointed to by rp.  If an attempt is made
  930. to read beyond the end-of-record, if the field is empty, or if there
  931. is an illegal character in the field, the error indicator for the
  932. record stream is set, and rngetf returns zero (0.0).  If the record stream is
  933. at end-of-file (end-of-file indicator set), rngetf returns zero (0.0).  If a
  934. previous error has occurred on the record stream that has not been cleared
  935. (error indicator set), rngetf returns zero (0.0).
  936.  
  937.  
  938. 1.3.24 The rngeti Function
  939.  
  940. Synopsis
  941.  
  942.      #include <recio.h>
  943.      int rngeti(REC *rp, unsigned int num);
  944.  
  945. Description
  946.  
  947. The rngeti function reads a field consisting of one integral number
  948. from the field number num for the input record stream pointed to by rp.
  949. Any leading or trailing white space in the field is ignored.
  950.  
  951. The first field in a record is field number 1, the second field is field
  952. number 2, etc.
  953.  
  954. If an error occurs, the error indicator for the record stream is set,
  955. the callback error function is called, and the function returns zero.
  956.  
  957. Returns
  958.  
  959. The rngeti function returns a signed integer from the input record
  960. stream pointed to by rp.  If an attempt is made to read beyond the
  961. end-of-record, if the field is empty, or if there is an illegal character
  962. in the field, the error indicator for the record stream is set, and rngeti
  963. returns zero.  If the record stream is at end-of-file (end-of-file indicator
  964. set), rngeti returns zero.  If a previous error has occurred on the record
  965. stream that has not been cleared (error indicator set), rngeti returns zero.
  966.  
  967.  
  968. 1.3.25 The rngetl Function
  969.  
  970. Synopsis
  971.  
  972.      #include <recio.h>
  973.      long rngetl(REC *rp, unsigned int num);
  974.  
  975. Description
  976.  
  977. The rngetl function reads a field consisting of one integral number
  978. from the field number num for the input record stream pointed to by rp.
  979. Any leading or trailing white space in the field is ignored.
  980.  
  981. The first field in a record is field number 1, the second field is field
  982. number 2, etc.
  983.  
  984. If an error occurs, the error indicator for the record stream is set,
  985. the callback error function is called, and the function returns zero (0L).
  986.  
  987. Returns
  988.  
  989. The rngetl function returns a signed long from the input record stream
  990. pointed to by rp.  If an attempt is made to read beyond the end-of-record,
  991. if the field is empty, or if there is an illegal character in the field,
  992. the error indicator for the record stream is set, and rngetl returns zero
  993. (0L).  If the record stream is at end-of-file (end-of-file indicator set),
  994. rngetl returns zero (0L).  If a previous error has occurred on the record
  995. stream that has not been cleared (error indicator set), rngetl returns zero
  996. (0L).
  997.  
  998.  
  999. 1.3.26 The rngets Function
  1000.  
  1001. Synopsis
  1002.  
  1003.      #include <recio.h>
  1004.      char *rngets(REC *rp, unsigned int num);
  1005.  
  1006. Description
  1007.  
  1008. The rngets function reads a field consisting of one text string from the
  1009. field number num for the input record stream pointed to by rp.  Any leading
  1010. white space before the text delimiter and any trailing white space after the
  1011. text delimiter in the field is ignored.  The text delimiters are not returned
  1012. as part of the string.
  1013.  
  1014. The first field in a record is field number 1, the second field is field
  1015. number 2, etc.
  1016.  
  1017. If an error occurs, the error indicator for the record stream is set, the
  1018. callback error function is called, and the function returns a pointer to
  1019. an empty string.
  1020.  
  1021. Returns
  1022.  
  1023. The rngets function returns a pointer to a character array from the input
  1024. record stream pointed to by rp.  If an attempt is made to read beyond the
  1025. end-of-record, the error indicator for the record stream is set, and rngets
  1026. returns a pointer to an empty string.  If the record stream is at end-of-file
  1027. (end-of-file indicator set), rngets returns a pointer to an empty string.  If
  1028. a previous error has occurred on the record stream that has not been cleared
  1029. (error indicator set), rngets returns a pointer to an empty string.
  1030.  
  1031.  
  1032. 1.3.27 The rngett Function
  1033.  
  1034. Synopsis
  1035.  
  1036.      #include <recio.h>
  1037.      time_t rngett(REC *rp, unsigned int num);
  1038.  
  1039. Description
  1040.  
  1041. The rngett function reads a field consisting of one time of type time_t from
  1042. the field number num for input record stream pointed to by rp.  Any leading
  1043. or trailing white space in the field is ignored.
  1044.  
  1045. The first field in a record is field number 1, the second field is field
  1046. number 2, etc.
  1047.  
  1048. If an error occurs, the error indicator for the record stream is set, the
  1049. callback error function is called, and the function returns (time_t)-1.
  1050.  
  1051. Returns
  1052.  
  1053. The rngett function returns a time of type time_t.  If an attempt is made to
  1054. read beyond the end-of-record, the error indicator for the record stream is
  1055. set, and rngett returns (time_t)-1.  If the record stream is at end-of-file
  1056. (end-of-file indicator set), rngett returns (time_t)-1.  If a previous error
  1057. has occurred on the record stream that has not been cleared (error indicator
  1058. set), rngett returns (time_t)-1.
  1059.  
  1060.  
  1061. 1.3.28 The rngettm Function
  1062.  
  1063. Synopsis
  1064.  
  1065.      #include <recio.h>
  1066.      struct tm rngettm(REC *rp, unsigned int num);
  1067.  
  1068. Description
  1069.  
  1070. The rngettm function reads a field consisting of one time of type struct tm
  1071. from the field number num for input record stream pointed to by rp.  Any
  1072. leading or trailing white space in the field is ignored.
  1073.  
  1074. The first field in a record is field number 1, the second field is field
  1075. number 2, etc.
  1076.  
  1077. If an error occurs, the error indicator for the record stream is set, the
  1078. callback error function is called, and the function returns an implementation
  1079. defined value.
  1080.  
  1081. Returns
  1082.  
  1083. The rngettm function returns a time of type struct tm.  If an attempt is made
  1084. to read beyond the end-of-record, the error indicator for the record stream
  1085. is set, and rngettm returns an implementation defined value.  If the record
  1086. stream is at end-of-file (end-of-file indicator set), rngettm returns an
  1087. implementation defined value.  If a previous error has occurred on the
  1088. record stream that has not been cleared (error indicator set), rngettm returns
  1089. an implementation defined value.
  1090.  
  1091.  
  1092. 1.3.29 The rngetui Function
  1093.  
  1094. Synopsis
  1095.  
  1096.      #include <recio.h>
  1097.      unsigned int rngetui(REC *rp, unsigned int num);
  1098.  
  1099. Description
  1100.  
  1101. The rngetui function reads a field consisting of one non-negative
  1102. integral number from the field number num for the input record stream
  1103. pointed to by rp.  Any leading or trailing white space in the field is
  1104. ignored.
  1105.  
  1106. The first field in a record is field number 1, the second field is field
  1107. number 2, etc.
  1108.  
  1109. If an error occurs, the error indicator for the record stream is set,
  1110. the callback error function is called, and the function returns zero.
  1111.  
  1112. Returns
  1113.  
  1114. The rngetui function returns an unsigned integer from the input record
  1115. stream pointed to by rp.  If an attempt is made to read beyond the
  1116. end-of-record, if the field is empty, or if there is an illegal character
  1117. in the field, the error indicator for the record stream is set, and rngetui
  1118. returns zero.  If the record stream is at end-of-file (end-of-file indicator
  1119. set), rngetui returns zero.  If a previous error has occurred on the record
  1120. stream that has not been cleared (error indicator set), rngetui returns zero.
  1121.  
  1122.  
  1123. 1.3.30 The rngetul Function
  1124.  
  1125. Synopsis
  1126.  
  1127.      #include <recio.h>
  1128.      unsigned long rngetul(REC *rp, unsigned int num);
  1129.  
  1130. Description
  1131.  
  1132. The rngetul function reads a field consisting of one non-negative
  1133. integral number from the field number num for the input record stream
  1134. pointed to by rp.  Any leading or trailing white space in the field is
  1135. ignored.
  1136.  
  1137. The first field in a record is field number 1, the second field is field
  1138. number 2, etc.
  1139.  
  1140. If an error occurs, the error indicator for the record stream is set, the
  1141. callback error function is called, and the function returns zero (0L).
  1142.  
  1143. Returns
  1144.  
  1145. The rngetul function returns an unsigned long from the input record stream
  1146. pointed to by rp.  If an attempt is made to read beyond the end-of-record,
  1147. if the field is empty, or if there is an illegal character in the field,
  1148. the error indicator for the record stream is set, and rngetul returns zero
  1149. (0L).  If the record stream is at end-of-file (end-of-file indicator set),
  1150. rngetul returns zero (0L).  If a previous error has occurred on the record
  1151. stream that has not been cleared (error indicator set), rngetul returns zero
  1152. (0L).
  1153.  
  1154. 1.3.31 The rsetfldch Function
  1155.  
  1156. Synopsis
  1157.  
  1158.      #include <recio.h>
  1159.      void rsetfldch(REC *rp, int ch);
  1160.  
  1161. Description
  1162.  
  1163. The rsetfldch function sets the field delimiter to the character ch
  1164. for the record stream pointed to by rp.  If the character ch is the
  1165. space character ' ', then the field is delimited by any white-space,
  1166. and multiple contiguous white space characters are treated as a single
  1167. delimiter.  If the character ch is other than the space character, then
  1168. multiple contiguous field delimiters are treated as a series of empty
  1169. fields.
  1170.  
  1171. If rsetfldch is not called, the field delimiter is set by the value of
  1172. the macro RECFLDCH.
  1173.  
  1174. If an error occurs, the error indicator for the record stream is set and
  1175. the callback error function is called.
  1176.  
  1177. Returns
  1178.  
  1179. The rsetfldch function returns no value.
  1180.  
  1181.  
  1182. 1.3.32 The rsettmfmt Function
  1183.  
  1184. Synopsis
  1185.  
  1186.      #include <recio.h>
  1187.      void rsettmfmt(REC *rp, char *fmt);
  1188.  
  1189. Description
  1190.  
  1191. The rsettmfmt function sets the time format according to the string fmt
  1192. for the record stream pointed to by rp.
  1193.  
  1194. Time formats are specified using a subset of the specifiers from the
  1195. ANSI-C strftime function.  Supported specifiers are:
  1196.  
  1197.         %d - day of month (1-31)
  1198.         %H - hour from 24-hour clock (0-23)
  1199.         %m - month (1-12)
  1200.         %M - minute (0-59)
  1201.         %s - second (0-61)
  1202.         %y - year without century (00-99)
  1203.         %Y - year with century (e.g. 1994)
  1204.  
  1205. If the rsettmfmt function is not called, the time format is set to
  1206. "%m/%d/%y".
  1207.  
  1208. If an error occurs, the error indicator for the record stream is set
  1209. and the callback error function is called.
  1210.  
  1211. Returns
  1212.  
  1213. The rsettmfmt function returns no value.
  1214.  
  1215.  
  1216. 1.3.33 The rsettxtch Function
  1217.  
  1218. Synopsis
  1219.  
  1220.      #include <recio.h>
  1221.      void rsettxtch(REC *rp, int ch);
  1222.  
  1223. Description
  1224.  
  1225. The rsettxtch function sets the text delimiter to the character ch for
  1226. the record stream pointed to by rp.
  1227.  
  1228. If rsettxtch is not called, the text delimiter is set by the value of
  1229. the macro RECTXTCH.
  1230.  
  1231. If an error occurs, the error indicator for the record stream is set and
  1232. the callback error function is called.
  1233.  
  1234. Returns
  1235.  
  1236. The rsettxtch function returns no value.
  1237.  
  1238.  
  1239. 1.3.34 The rskipfld Function
  1240.  
  1241. Synopsis
  1242.  
  1243.      #include <recio.h>
  1244.      void rskipfld(REC *rp);
  1245.  
  1246. Description
  1247.  
  1248. The rskipfld function skips to the next field for the record stream
  1249. pointed to by rp.
  1250.  
  1251. If an error occurs, the error indicator for the record stream is set
  1252. and the callback error function is called.
  1253.  
  1254. Returns
  1255.  
  1256. The rskipfld function returns no value.
  1257.  
  1258.  
  1259. 1.3.35 The rskipnfld Function
  1260.  
  1261. Synopsis
  1262.  
  1263.      #include <recio.h>
  1264.      void rskipnfld(REC *rp, unsigned int num);
  1265.  
  1266. Description
  1267.  
  1268. The rskipnfld function skips over num number of fields for the record
  1269. stream pointed to by rp.
  1270.  
  1271. If an error occurs, the error indicator for the record stream is set
  1272. and the callback error function is called.
  1273.  
  1274. Returns
  1275.  
  1276. The rskipnfld function returns no value.
  1277.  
  1278.  
  1279.  
  1280. 1.4 Character Delimited Field Output Functions
  1281.  
  1282. The character delimited field output functions automatically place the
  1283. field delimiter character between fields in the output.
  1284.  
  1285.  
  1286. 1.4.1 The rbputi Function
  1287.  
  1288. Synopsis
  1289.  
  1290.      #include <recio.h>
  1291.      void rbputi(REC *rp, int base, int number);
  1292.  
  1293. Description
  1294.  
  1295. The rbputi function writes an integral number in the radix base to the
  1296. output record stream pointed to by rp.  Base may be between 2 to 36.
  1297.  
  1298. If an error occurs, the error indicator for the record stream is set and
  1299. the callback error function is called.
  1300.  
  1301. Returns
  1302.  
  1303. The rbputi function returns no value.
  1304.  
  1305.  
  1306. 1.4.2 The rbputl Function
  1307.  
  1308. Synopsis
  1309.  
  1310.      #include <recio.h>
  1311.      void rbputl(REC *rp, int base, long number);
  1312.  
  1313. Description
  1314.  
  1315. The rbputl function writes an integral number in the radix base to the
  1316. output record stream pointed to by rp.  Base may be between 2 to 36.
  1317.  
  1318. If an error occurs, the error indicator for the record stream is set and
  1319. the callback error function is called.
  1320.  
  1321. Returns
  1322.  
  1323. The rbputl function returns no value.
  1324.  
  1325.  
  1326. 1.4.3 The rbputui Function
  1327.  
  1328. Synopsis
  1329.  
  1330.      #include <recio.h>
  1331.      void rbputui(REC *rp, int base, unsigned int number);
  1332.  
  1333. Description
  1334.  
  1335. The rbputui function writes an unsigned integral number in the radix base to
  1336. the output record stream pointed to by rp.  Base may be between 2 to 36.
  1337.  
  1338. If an error occurs, the error indicator for the record stream is set and
  1339. the callback error function is called.
  1340.  
  1341. Returns
  1342.  
  1343. The rbputui function returns no value.
  1344.  
  1345.  
  1346. 1.4.4 The rbputul Function
  1347.  
  1348. Synopsis
  1349.  
  1350.      #include <recio.h>
  1351.      void rbputul(REC *rp, int base, unsigned long number);
  1352.  
  1353. Description
  1354.  
  1355. The rbputul function writes an unsigned integral number in the radix base to
  1356. the output record stream pointed to by rp.  Base may be between 2 to 36.
  1357.  
  1358. If an error occurs, the error indicator for the record stream is set and
  1359. the callback error function is called.
  1360.  
  1361. Returns
  1362.  
  1363. The rbputul function returns no value.
  1364.  
  1365.  
  1366. 1.4.5 The rputc Function
  1367.  
  1368. Synopsis
  1369.  
  1370.      #include <recio.h>
  1371.      void rputc(REC *rp, int ch);
  1372.  
  1373. Description
  1374.  
  1375. The rputc function writes a character ch to the output record stream
  1376. pointed to by rp.
  1377.  
  1378. If an error occurs, the error indicator for the record stream is set and
  1379. the callback error function is called.
  1380.  
  1381. Returns
  1382.  
  1383. The rputc function returns no value.
  1384.  
  1385.  
  1386. 1.4.6 The rputd Function
  1387.  
  1388. Synopsis
  1389.  
  1390.      #include <recio.h>
  1391.      void rputd(REC *rp, double number);
  1392.  
  1393. Description
  1394.  
  1395. The rputd function writes a floating point number to the output record
  1396. stream pointed to by rp.
  1397.  
  1398. If an error occurs, the error indicator for the record stream is set and
  1399. the callback error function is called.
  1400.  
  1401. Returns
  1402.  
  1403. The rputd function returns no value.
  1404.  
  1405.  
  1406. 1.4.7 The rputf Function
  1407.  
  1408. Synopsis
  1409.  
  1410.      #include <recio.h>
  1411.      void rputf(REC *rp, float number);
  1412.  
  1413. Description
  1414.  
  1415. The rputf function writes a floating point number to the output record
  1416. stream pointed to by rp.
  1417.  
  1418. If an error occurs, the error indicator for the record stream is set and
  1419. the callback error function is called.
  1420.  
  1421. Returns
  1422.  
  1423. The rputf function returns no value.
  1424.  
  1425.  
  1426. 1.4.8 The rputi Function
  1427.  
  1428. Synopsis
  1429.  
  1430.      #include <recio.h>
  1431.      void rputi(REC *rp, int number);
  1432.  
  1433. Description
  1434.  
  1435. The rputi function writes an integral number to the output record stream
  1436. pointed to by rp.
  1437.  
  1438. If an error occurs, the error indicator for the record stream is set and
  1439. the callback error function is called.
  1440.  
  1441. Returns
  1442.  
  1443. The rputi function returns no value.
  1444.  
  1445.  
  1446. 1.4.9 The rputl Function
  1447.  
  1448. Synopsis
  1449.  
  1450.      #include <recio.h>
  1451.      void rputl(REC *rp, long number);
  1452.  
  1453. Description
  1454.  
  1455. The rputl function writes an integral number to the output record stream
  1456. pointed to by rp.
  1457.  
  1458. If an error occurs, the error indicator for the record stream is set and
  1459. the callback error function is called.
  1460.  
  1461. Returns
  1462.  
  1463. The rputl function returns no value.
  1464.  
  1465.  
  1466. 1.4.10 The rputs Function
  1467.  
  1468. Synopsis
  1469.  
  1470.      #include <recio.h>
  1471.      void rputs(REC *rp, char *string);
  1472.  
  1473. Description
  1474.  
  1475. The rputs function writes a string of characters to the output record
  1476. stream pointed to by rp.  If the text delimiter character is not the space
  1477. character, text delimiters are placed around the text.
  1478.  
  1479. If an error occurs, the error indicator for the record stream is set and
  1480. the callback error function is called.
  1481.  
  1482. Returns
  1483.  
  1484. The rputs function returns no value.
  1485.  
  1486.  
  1487. 1.4.11 The rputt Function
  1488.  
  1489. Synopsis
  1490.  
  1491.      #include <recio.h>
  1492.      void rputt(REC *rp, time_t time);
  1493.  
  1494. Description
  1495.  
  1496. The rputt function writes the time to the output record stream pointed to by
  1497. rp.  The format of the time is determined by the time format for the record
  1498. stream.  See section 1.3.16 on how to set the time format.
  1499.  
  1500. If an error occurs, the error indicator for the record stream is set and
  1501. the callback error function is called.
  1502.  
  1503. Returns
  1504.  
  1505. The rputt function returns no value.
  1506.  
  1507.  
  1508. 1.4.12 The rputtm Function
  1509.  
  1510. Synopsis
  1511.  
  1512.      #include <recio.h>
  1513.      void rputtm(REC *rp, struct tm t);
  1514.  
  1515. Description
  1516.  
  1517. The rputtm function writes out the time as specified by the contents of
  1518. struct tm t to the output record stream pointed to by rp.  The format of
  1519. the time is determined by the time format for the record stream.  See
  1520. section 1.3.16 on how to set the time format.
  1521.  
  1522. If an error occurs, the error indicator for the record stream is set and
  1523. the callback error function is called.
  1524.  
  1525. Returns
  1526.  
  1527. The rputtm function returns no value.
  1528.  
  1529.  
  1530. 1.4.13 The rputui Function
  1531.  
  1532. Synopsis
  1533.  
  1534.      #include <recio.h>
  1535.      void rputui(REC *rp, unsigned int number);
  1536.  
  1537. Description
  1538.  
  1539. The rputui function writes an unsigned integral number to the output record
  1540. stream pointed to by rp.
  1541.  
  1542. If an error occurs, the error indicator for the record stream is set and
  1543. the callback error function is called.
  1544.  
  1545. Returns
  1546.  
  1547. The rputui function returns no value.
  1548.  
  1549.  
  1550. 1.4.14 The rputul Function
  1551.  
  1552. Synopsis
  1553.  
  1554.      #include <recio.h>
  1555.      void rputul(REC *rp, unsigned long number);
  1556.  
  1557. Description
  1558.  
  1559. The rputul function writes an unsigned integral number to the output record
  1560. stream pointed to by rp.
  1561.  
  1562. If an error occurs, the error indicator for the record stream is set and
  1563. the callback error function is called.
  1564.  
  1565. Returns
  1566.  
  1567. The rputul function returns no value.
  1568.  
  1569.  
  1570.  
  1571. 1.5 Column Delimited Field Input Functions
  1572.  
  1573. The column delimited field input functions use column positions to
  1574. determine the start and end of each field.
  1575.  
  1576.  
  1577. 1.5.1 The rcbgeti Function
  1578.  
  1579. Synopsis
  1580.  
  1581.      #include <recio.h>
  1582.      int rcbgeti(REC *rp, size_t begcol, size_t endcol, int base);
  1583.  
  1584. Description
  1585.  
  1586. The rcbgeti function gets one integral number represented by the radix
  1587. determined by the value of base and contained inclusively from column
  1588. begcol to column endcol for the input record stream pointed to by rp.
  1589. Any leading or trailing white space in the field is ignored.
  1590.  
  1591. Base may be zero or in the range of 2 to 36 inclusive.  If the value of
  1592. base is zero, the expected form of the integral number is described by
  1593. section 3.1.3.2 of ANSI X3.159-1989.
  1594.  
  1595. If an error occurs, the error indicator for the record stream is set,
  1596. the callback error function is called, and the function returns zero.
  1597.  
  1598. Returns
  1599.  
  1600. The rcbgeti function returns a signed integer from the input record stream
  1601. pointed to by rp.  If begcol is beyond the end-of-record, if the field is
  1602. empty, or if there is an illegal character in the field, the error indicator
  1603. for the record stream is set, and rcbgeti returns zero.  If the record stream
  1604. is at end-of-file (end-of-file indicator set), rcbgeti returns zero.  If a
  1605. previous error has occurred on the record stream that has not been cleared
  1606. (error indicator set), rcbgeti returns zero.
  1607.  
  1608.  
  1609. 1.5.2 The rcbgetl Function
  1610.  
  1611. Synopsis
  1612.  
  1613.      #include <recio.h>
  1614.      long rcbgetl(REC *rp, size_t begcol, size_t endcol, int base);
  1615.  
  1616. Description
  1617.  
  1618. The rcbgetl function gets one integral number represented by the radix
  1619. determined by the value of base and contained inclusively from column
  1620. begcol to column endcol for the input record stream pointed to by rp.
  1621. Any leading or trailing white space in the field is ignored.
  1622.  
  1623. Base may be zero or in the range of 2 to 36 inclusive.  If the value of
  1624. base is zero, the expected form of the integral number is described by
  1625. section 3.1.3.2 of ANSI X3.159-1989.
  1626.  
  1627. If an error occurs, the error indicator for the record stream is set,
  1628. the callback error function is called, and the function returns zero (0L).
  1629.  
  1630. Returns
  1631.  
  1632. The rcbgetl function returns a signed long from the input record stream
  1633. pointed to by rp.  If begcol is beyond the end-of-record, if the field is
  1634. empty, or if there is an illegal character in the field, the error indicator
  1635. for the record stream is set, and rcbgetl returns zero (0L).  If the record
  1636. stream is at end-of-file (end-of-file indicator set), rcbgetl returns zero
  1637. (0L).  If a previous error has occurred on the record stream that has not been
  1638. cleared (error indicator set), rcbgetl returns zero (0L).
  1639.  
  1640.  
  1641. 1.5.3 The rcbgetui Function
  1642.  
  1643. Synopsis
  1644.  
  1645.      #include <recio.h>
  1646.      unsigned int rcbgetui(REC *rp, size_t begcol, size_t endcol,
  1647.           int base);
  1648.  
  1649. Description
  1650.  
  1651. The rcbgetui function gets one non-negative integral number represented
  1652. by the radix determined by the value of base and contained inclusively
  1653. from column begcol to column endcol for the input record stream pointed
  1654. to by rp.  Any leading or trailing white space in the field is ignored.
  1655.  
  1656. Base may be zero or in the range of 2 to 36 inclusive.  If the value of
  1657. base is zero, the expected form of the integral number is described by
  1658. section 3.1.3.2 of ANSI X3.159-1989.
  1659.  
  1660. If an error occurs, the error indicator for the record stream is set,
  1661. the callback error function is called, and the function returns zero.
  1662.  
  1663. Returns
  1664.  
  1665. The rcbgetui function returns an unsigned integer from the input record
  1666. stream pointed to by rp.  If begcol is beyond the end-of-record, if the
  1667. field is empty, or if there is an illegal character in the field, the
  1668. error indicator for the record stream is set, and rcbgetui returns zero.  If
  1669. the record stream is at end-of-file (end-of-file indicator set), rcbgetui
  1670. returns zero.  If a previous error has occurred on the record stream that has
  1671. not been cleared (error indicator set), rcbgetui returns zero.
  1672.  
  1673.  
  1674. 1.5.4 The rcbgetul Function
  1675.  
  1676. Synopsis
  1677.  
  1678.      #include <recio.h>
  1679.      unsigned long rcbgetul(REC *rp, size_t begcol, size_t endcol,
  1680.           int base);
  1681.  
  1682. Description
  1683.  
  1684. The rcbgetul function gets one non-negative integral number represented
  1685. by the radix determined by the value of base and contained inclusively
  1686. from column begcol to column endcol for the input record stream pointed
  1687. to by rp.  Any leading or trailing white space in the field is ignored.
  1688.  
  1689. Base may be zero or in the range of 2 to 36 inclusive.  If the value of
  1690. base is zero, the expected form of the integral number is described by
  1691. section 3.1.3.2 of ANSI X3.159-1989.
  1692.  
  1693. If an error occurs, the error indicator for the record stream is set,
  1694. the callback error function is called, and the function returns zero (0L).
  1695.  
  1696. Returns
  1697.  
  1698. The rcbgetul function returns an unsigned long from the input record stream
  1699. pointed to by rp.  If begcol is beyond the end-of-record, if the field is
  1700. empty, or if there is an illegal character in the field, the error indicator
  1701. for the record stream is set, and rcbgetul returns zero (0L).  If the record
  1702. stream is at end-of-file (end-of-file indicator set), rcbgetul returns zero
  1703. (0L).  If a previous error has occurred on the record stream that has not been
  1704. cleared (error indicator set), rcbgetul returns zero (0L).
  1705.  
  1706.  
  1707. 1.5.5 The rcgetc Function
  1708.  
  1709. Synopsis
  1710.  
  1711.      #include <recio.h>
  1712.      int rcgetc(REC *rp, size_t col);
  1713.  
  1714. Description
  1715.  
  1716. The rcgetc function obtains from column position col the unsigned char
  1717. converted to an int from the input record stream pointed to by rp.
  1718.  
  1719. If an error occurs, the error indicator for the record stream is set,
  1720. the callback error function is called, and the function returns EOF.
  1721.  
  1722. Returns
  1723.  
  1724. The rcgetc function returns a character from column position col from
  1725. the input record stream pointed to by rp.  If an attempt is made to read
  1726. beyond the end-of-record, the error indicator for the record stream is set,
  1727. and rcgetc returns EOF.  If the record stream is at end-of-file (end-of-file
  1728. indicator set), rcgetc returns EOF.  If a previous error has occurred on the
  1729. record stream that has not been cleared (error indicator set), rcgetc returns
  1730. EOF.
  1731.  
  1732.  
  1733. 1.5.6 The rcgetd Function
  1734.  
  1735. Synopsis
  1736.  
  1737.      #include <recio.h>
  1738.      double rcgetd(REC *rp, size_t begcol, size_t endcol);
  1739.  
  1740. Description
  1741.  
  1742. The rcgetd function gets one floating point number contained inclusively
  1743. from column begcol to column endcol for the input record stream pointed to
  1744. by rp.  Any leading or trailing white space in the field is ignored.
  1745.  
  1746. If an error occurs, the error indicator for the record stream is set,
  1747. the callback error function is called, and the function returns zero.
  1748.  
  1749. Returns
  1750.  
  1751. The rcgetd function returns a double precision floating point number from the
  1752. input record stream pointed to by rp.  If begcol is beyond the end-of-record,
  1753. if the field is empty, or if there is an illegal character in the field, the
  1754. error indicator for the record stream is set, and rcgetd returns zero (0.0).
  1755. If the record stream is at end-of-file (end-of-file indicator set), rcgetd
  1756. returns zero (0.0).  If a previous error has occurred on the record stream
  1757. that has not been cleared (error indicator set), rcgetd returns zero (0.0).
  1758.  
  1759.  
  1760. 1.5.7 The rcgetf Function
  1761.  
  1762. Synopsis
  1763.  
  1764.      #include <recio.h>
  1765.      float rcgetf(REC *rp, size_t begcol, size_t endcol);
  1766.  
  1767. Description
  1768.  
  1769. The rcgetf function gets one floating point number contained inclusively
  1770. from column begcol to column endcol for the input record stream pointed to
  1771. by rp.  Any leading or trailing white space in the field is ignored.
  1772.  
  1773. If an error occurs, the error indicator for the record stream is set,
  1774. the callback error function is called, and the function returns zero.
  1775.  
  1776. Returns
  1777.  
  1778. The rcgetf function returns a single precision floating point number from the
  1779. input record stream pointed to by rp.  If begcol is beyond the end-of-record,
  1780. if the field is empty, or if there is an illegal character in the field, the
  1781. error indicator for the record stream is set, and rcgetf returns zero (0.0).
  1782. If the record stream is at end-of-file (end-of-file indicator set), rcgetf
  1783. returns zero (0.0).  If a previous error has occurred on the record stream
  1784. that has not been cleared (error indicator set), rcgetf returns zero (0.0).
  1785.  
  1786.  
  1787. 1.5.8 The rcgeti Function
  1788.  
  1789. Synopsis
  1790.  
  1791.      #include <recio.h>
  1792.      int rcgeti(REC *rp, size_t begcol, size_t endcol);
  1793.  
  1794. Description
  1795.  
  1796. The rcgeti function gets one integral number contained inclusively from
  1797. column begcol to column endcol for the input record stream pointed to by
  1798. rp.  Any leading or trailing white space in the field is ignored.
  1799.  
  1800. If an error occurs, the error indicator for the record stream is set,
  1801. the callback error function is called, and the function returns zero.
  1802.  
  1803. Returns
  1804.  
  1805. The rcgeti function returns a signed integer from the input record stream
  1806. pointed to by rp.  If begcol is beyond the end-of-record, if the field is
  1807. empty, or if there is an illegal character in the field, the error indicator
  1808. for the record stream is set, and rcgeti returns zero.  If the record stream
  1809. is at end-of-file (end-of-file indicator set), rcgeti returns zero.  If a
  1810. previous error has occurred on the record stream that has not been cleared
  1811. (error indicator set), rcgeti returns zero.
  1812.  
  1813.  
  1814. 1.5.9 The rcgetl Function
  1815.  
  1816. Synopsis
  1817.  
  1818.      #include <recio.h>
  1819.      long rcgetl(REC *rp, size_t begcol, size_t endcol);
  1820.  
  1821. Description
  1822.  
  1823. The rcgetl function gets one integral number contained inclusively from
  1824. column begcol to column endcol for the input record stream pointed to by
  1825. rp.  Any leading or trailing white space in the field is ignored.
  1826.  
  1827. If an error occurs, the error indicator for the record stream is set,
  1828. the callback error function is called, and the function returns zero (0L).
  1829.  
  1830. Returns
  1831.  
  1832. The rcgetl function returns a signed long from the input record stream
  1833. pointed to by rp.  If begcol is beyond the end-of-record, if the field is
  1834. empty, or if there is an illegal character in the field, the error indicator
  1835. for the record stream is set, and rcgetl returns zero (0L).  If the record
  1836. stream is at end-of-file (end-of-file indicator set), rcgetl returns zero
  1837. (0L).  If a previous error has occurred on the record stream that has not
  1838. been cleared (error indicator set), rcgetl returns zero (0L).
  1839.  
  1840.  
  1841. 1.5.10 The rcgets Function
  1842.  
  1843. Synopsis
  1844.  
  1845.      #include <recio.h>
  1846.      char *rcgets(REC *rp, size_t begcol, size_t endcol);
  1847.  
  1848. Description
  1849.  
  1850. The rcgets function gets a string contained inclusively from column
  1851. begcol to column endcol for the input record stream pointed to by
  1852. rp.  The rcgets function does not remove any leading or trailing
  1853. white space, nor does it remove any text delimiter characters.
  1854.  
  1855. If an error occurs, the error indicator for the record stream is set,
  1856. the callback error function is called, and the function returns a pointer
  1857. to an empty string.
  1858.  
  1859. Returns
  1860.  
  1861. The rcgets function returns a pointer to a character array from the input
  1862. record stream pointed to by rp.  If begcol is beyond the end-of-record, the
  1863. error indicator for the record stream is set, and rcgets returns a pointer to
  1864. an empty string.  If the record stream is at end-of-file (eof indicator set),
  1865. rcgets returns a pointer to an empty string.  If a previous error has occurred
  1866. on the record stream that has not been cleared (error indicator set), rcgets
  1867. returns a pointer to an empty string.
  1868.  
  1869.  
  1870. 1.5.11 The rcgett Function
  1871.  
  1872. Synopsis
  1873.  
  1874.      #include <recio.h>
  1875.      time_t rcgett(REC *rp, size_t begcol, size_t endcol);
  1876.  
  1877. Description
  1878.  
  1879. The rcgett function reads a field consisting of one time of type time_t
  1880. contained inclusively from column begcol to column endcol for the input
  1881. record stream pointed to by rp.  Any leading or trailing white space in
  1882. the field is ignored.
  1883.  
  1884. If an error occurs, the error indicator for the record stream is set, the
  1885. callback error function is called, and the function returns (time_t)-1.
  1886.  
  1887. Returns
  1888.  
  1889. The rcgett function returns a time of type time_t.  If an attempt is made to
  1890. read beyond the end-of-record, the error indicator for the record stream is
  1891. set, and rcgett returns (time_t)-1.  If the record stream is at end-of-file
  1892. (end-of-file indicator set), rcgett returns (time_t)-1.  If a previous error
  1893. has occurred on the record stream that has not been cleared (error indicator
  1894. set), rcgett returns (time_t)-1.
  1895.  
  1896.  
  1897. 1.5.12 The rcgettm Function
  1898.  
  1899. Synopsis
  1900.  
  1901.      #include <recio.h>
  1902.      struct tm rcgettm(REC *rp, size_t begcol, size_t endcol);
  1903.  
  1904. Description
  1905.  
  1906. The rcgettm function reads a field consisting of one time of type struct tm
  1907. contained inclusively from column begcol to column endcol for the input
  1908. record stream pointed to by rp.  Any leading or trailing white space in the
  1909. field is ignored.
  1910.  
  1911. If an error occurs, the error indicator for the record stream is set, the
  1912. callback error function is called, and an implementation defined value is
  1913. returned.
  1914.  
  1915. Returns
  1916.  
  1917. The rcgettm function returns a time of type struct tm.  If an attempt is made
  1918. to read beyond the end-of-record, the error indicator for the record stream
  1919. is set, and rcgettm returns an implementation defined value.  If the record
  1920. stream is at end-of-file (end-of-file indicator set), rcgettm returns an
  1921. implementation defined value.  If a previous error has occurred on the
  1922. record stream that has not been cleared (error indicator set), rcgettm
  1923. returns an implementation defined value.
  1924.  
  1925.  
  1926. 1.5.13 The rcgetui Function
  1927.  
  1928. Synopsis
  1929.  
  1930.      #include <recio.h>
  1931.      unsigned int rcgetui(REC *rp, size_t begcol, size_t endcol);
  1932.  
  1933. Description
  1934.  
  1935. The rcgetui function gets one non-negative integral number contained
  1936. inclusively from column begcol to column endcol for the input record
  1937. stream pointed to by rp.  Any leading or trailing white space in the
  1938. field is ignored.
  1939.  
  1940. If an error occurs, the error indicator for the record stream is set,
  1941. the callback error function is called, and the function returns zero.
  1942.  
  1943. Returns
  1944.  
  1945. The rcgetui function returns an unsigned integer from the input record
  1946. stream pointed to by rp.  If begcol is beyond the end-of-record, if the
  1947. field is empty, or if there is an illegal character in the field, the
  1948. error indicator for the record stream is set, and rcgetui returns zero.  If
  1949. the record stream is at end-of-file (end-of-file indicator set), rcgetui
  1950. returns zero.  If a previous error has occurred on the record stream that has
  1951. not been cleared (error indicator set), rcgetui returns zero.
  1952.  
  1953.  
  1954. 1.5.14 The rcgetul Function
  1955.  
  1956. Synopsis
  1957.  
  1958.      #include <recio.h>
  1959.      unsigned long rcgetul(REC *rp, size_t begcol, size_t endcol);
  1960.  
  1961. Description
  1962.  
  1963. The rcgetul function gets one non-negative integral number contained
  1964. inclusively from column begcol to column endcol for the input record
  1965. stream pointed to by rp.  Any leading or trailing white space in the
  1966. field is ignored.
  1967.  
  1968. If an error occurs, the error indicator for the record stream is set,
  1969. the callback error function is called, and the function returns zero (0L).
  1970.  
  1971. Returns
  1972.  
  1973. The rcgetul function returns an unsigned long from the input record stream
  1974. pointed to by rp.  If begcol is beyond the end-of-record, if the field is
  1975. empty, or if there is an illegal character in the field, the error indicator
  1976. for the record stream is set, and rcgetul returns zero (0L).  If the record
  1977. stream is at end-of-file (end-of-file indicator set), rcgetul returns zero
  1978. (0L).  If a previous error has occurred on the record stream that has not
  1979. been cleared (error indicator set), rcgetul returns zero (0L).
  1980.  
  1981.  
  1982.  
  1983. 1.6 Column Delimited Field Output Functions
  1984.  
  1985. The column delimited field output functions automatically place the number,
  1986. string or character between the specified columns in the output.
  1987.  
  1988.  
  1989. 1.6.1 The rcbputi Function
  1990.  
  1991. Synopsis
  1992.  
  1993.      #include <recio.h>
  1994.      void rcbputi(REC *rp, size_t begcol, size_t endcol, int base,
  1995.                   int number);
  1996.  
  1997. Description
  1998.  
  1999. The rcbputi function writes an integral number in the radix base from column
  2000. begcol to column endcol of the output record stream pointed to by rp.  Base
  2001. may be between 2 to 36.
  2002.  
  2003. If the number is too large to fit between the columns, asterisks are printed
  2004. between the columns and the callback warning function is called.  The
  2005. warning indicator for the record stream is set.
  2006.  
  2007. If an error occurs, the error indicator for the record stream is set and
  2008. the callback error function is called.
  2009.  
  2010. Returns
  2011.  
  2012. The rcbputi function returns no value.
  2013.  
  2014.  
  2015. 1.6.2 The rcbputl Function
  2016.  
  2017. Synopsis
  2018.  
  2019.      #include <recio.h>
  2020.      void rcbputl(REC *rp, size_t begcol, size_t endcol, int base,
  2021.                   long number);
  2022.  
  2023. Description
  2024.  
  2025. The rcbputl function writes an integral number in the radix base from column
  2026. begcol to column endcol of the output record stream pointed to by rp.  Base
  2027. may be between 2 to 36.
  2028.  
  2029. If the number is too large to fit between the columns, asterisks are printed
  2030. between the columns and the callback warning function is called.  The
  2031. warning indicator for the record stream is set.
  2032.  
  2033. If an error occurs, the error indicator for the record stream is set and
  2034. the callback error function is called.
  2035.  
  2036. Returns
  2037.  
  2038. The rcbputl function returns no value.
  2039.  
  2040.  
  2041. 1.6.3 The rcbputui Function
  2042.  
  2043. Synopsis
  2044.  
  2045.      #include <recio.h>
  2046.      void rcbputui(REC *rp, size_t begcol, size_t endcol, int base,
  2047.                    unsigned int number);
  2048.  
  2049. Description
  2050.  
  2051. The rcbputui function writes an unsigned integral number in the radix base
  2052. from column begcol to column endcol of the output record stream pointed to
  2053. by rp.  Base may be between 2 to 36.
  2054.  
  2055. If the number is too large to fit between the columns, asterisks are printed
  2056. between the columns and the callback warning function is called.  The
  2057. warning indicator for the record stream is set.
  2058.  
  2059. If an error occurs, the error indicator for the record stream is set and
  2060. the callback error function is called.
  2061.  
  2062. Returns
  2063.  
  2064. The rcbputui function returns no value.
  2065.  
  2066.  
  2067. 1.6.4 The rcbputul Function
  2068.  
  2069. Synopsis
  2070.  
  2071.      #include <recio.h>
  2072.      void rcbputul(REC *rp, size_t begcol, size_t endcol, int base,
  2073.                    unsigned long number);
  2074.  
  2075. Description
  2076.  
  2077. The rcbputul function writes an unsigned integral number in the radix base
  2078. from column begcol to column endcol of the output record stream pointed to
  2079. by rp.  Base may be between 2 to 36.
  2080.  
  2081. If the number is too large to fit between the columns, asterisks are printed
  2082. between the columns and the callback warning function is called.  The
  2083. warning indicator for the record stream is set.
  2084.  
  2085. If an error occurs, the error indicator for the record stream is set and
  2086. the callback error function is called.
  2087.  
  2088. Returns
  2089.  
  2090. The rcbputul function returns no value.
  2091.  
  2092.  
  2093. 1.6.5 The rcputc Function
  2094.  
  2095. Synopsis
  2096.  
  2097.      #include <recio.h>
  2098.      void rcputc(REC *rp, size_t col, int ch);
  2099.  
  2100. Description
  2101.  
  2102. The rcputc function writes a character ch at column col of the output record
  2103. stream pointed to by rp.
  2104.  
  2105. If an error occurs, the error indicator for the record stream is set and
  2106. the callback error function is called.
  2107.  
  2108. Returns
  2109.  
  2110. The rcputc function returns no value.
  2111.  
  2112.  
  2113. 1.6.6 The rcputd Function
  2114.  
  2115. Synopsis
  2116.  
  2117.      #include <recio.h>
  2118.      void rcputd(REC *rp, size_t begcol, size_t endcol, double number);
  2119.  
  2120. Description
  2121.  
  2122. The rcputd function writes a floating point number from column begcol to
  2123. column endcol of the output record stream pointed to by rp.
  2124.  
  2125. If the number is too large to fit between the columns, asterisks are printed
  2126. between the columns and the callback warning function is called.  The
  2127. warning indicator for the record stream is set.
  2128.  
  2129. If an error occurs, the error indicator for the record stream is set and
  2130. the callback error function is called.
  2131.  
  2132. Returns
  2133.  
  2134. The rcputd function returns no value.
  2135.  
  2136.  
  2137. 1.6.7 The rcputf Function
  2138.  
  2139. Synopsis
  2140.  
  2141.      #include <recio.h>
  2142.      void rcputf(REC *rp, size_t begcol, size_t endcol, float number);
  2143.  
  2144. Description
  2145.  
  2146. The rcputf function writes a floating point number from column begcol to
  2147. column endcol of the output record stream pointed to by rp.
  2148.  
  2149. If the number is too large to fit between the columns, asterisks are printed
  2150. between the columns and the callback warning function is called.  The
  2151. warning indicator for the record stream is set.
  2152.  
  2153. If an error occurs, the error indicator for the record stream is set and
  2154. the callback error function is called.
  2155.  
  2156. Returns
  2157.  
  2158. The rcputf function returns no value.
  2159.  
  2160.  
  2161. 1.6.8 The rcputi Function
  2162.  
  2163. Synopsis
  2164.  
  2165.      #include <recio.h>
  2166.      void rcputi(REC *rp, size_t begcol, size_t endcol, int number);
  2167.  
  2168. Description
  2169.  
  2170. The rcputi function writes an integral number from column begcol to column
  2171. endcol of the output record stream pointed to by rp.
  2172.  
  2173. If the number is too large to fit between the columns, asterisks are printed
  2174. between the columns and the callback warning function is called.  The
  2175. warning indicator for the record stream is set.
  2176.  
  2177. If an error occurs, the error indicator for the record stream is set and
  2178. the callback error function is called.
  2179.  
  2180. Returns
  2181.  
  2182. The rcputi function returns no value.
  2183.  
  2184.  
  2185. 1.6.9 The rcputl Function
  2186.  
  2187. Synopsis
  2188.  
  2189.      #include <recio.h>
  2190.      void rcputl(REC *rp, size_t begcol, size_t endcol, long number);
  2191.  
  2192. Description
  2193.  
  2194. The rcputl function writes an integral number from column begcol to column
  2195. endcol of the output record stream pointed to by rp.
  2196.  
  2197. If the number is too large to fit between the columns, asterisks are printed
  2198. between the columns and the callback warning function is called.  The
  2199. warning indicator for the record stream is set.
  2200.  
  2201. If an error occurs, the error indicator for the record stream is set and
  2202. the callback error function is called.
  2203.  
  2204. Returns
  2205.  
  2206. The rcputl function returns no value.
  2207.  
  2208.  
  2209. 1.6.10 The rcputs Function
  2210.  
  2211. Synopsis
  2212.  
  2213.      #include <recio.h>
  2214.      void rcputs(REC *rp, size_t begcol, size_t endcol, char *string);
  2215.  
  2216. Description
  2217.  
  2218. The rcputs function writes a string of characters from column begcol to
  2219. column endcol of the output record stream pointed to by rp.
  2220.  
  2221. If the string is too large to fit between the columns, a truncated string
  2222. is output and the callback warning function is called.  The warning
  2223. indicator for the record stream is set.
  2224.  
  2225. If an error occurs, the error indicator for the record stream is set and
  2226. the callback error function is called.
  2227.  
  2228. Returns
  2229.  
  2230. The rcputs function returns no value.
  2231.  
  2232.  
  2233. 1.6.11 The rcputt Function
  2234.  
  2235. Synopsis
  2236.  
  2237.      #include <recio.h>
  2238.      void rcputt(REC *rp, size_t begcol, size_t endcol, time_t time);
  2239.  
  2240. Description
  2241.  
  2242. The rcputt function writes the time from column begcol to column endcol
  2243. of the output record stream pointed to by rp.  The format of the time is
  2244. determined by the time format for the record stream.  See section 1.3.16
  2245. on how to set the time format.
  2246.  
  2247. If the time is too large to fit between the columns, asterisks are printed
  2248. between the columns and the callback warning function is called.  The
  2249. warning indicator for the record stream is set.
  2250.  
  2251. If an error occurs, the error indicator for the record stream is set and
  2252. the callback error function is called.
  2253.  
  2254. Returns
  2255.  
  2256. The rcputt function returns no value.
  2257.  
  2258.  
  2259. 1.6.12 The rcputtm Function
  2260.  
  2261. Synopsis
  2262.  
  2263.      #include <recio.h>
  2264.      void rcputtm(REC *rp, size_t begcol, size_t endcol, struct tm t);
  2265.  
  2266. Description
  2267.  
  2268. The rcputtm function writes out the time as specified by the contents of
  2269. struct tm t from column begcol to column endcol of the output record
  2270. stream pointed to by rp.  The format of the time is determined by the
  2271. time format for the record stream.  See section 1.3.16 on how to set the
  2272. time format.
  2273.  
  2274. If the time is too large to fit between the columns, asterisks are printed
  2275. between the columns and the callback warning function is called.  The
  2276. warning indicator for the record stream is set.
  2277.  
  2278. If an error occurs, the error indicator for the record stream is set and
  2279. the callback error function is called.
  2280.  
  2281. Returns
  2282.  
  2283. The rcputtm function returns no value.
  2284.  
  2285.  
  2286. 1.6.13 The rcputui Function
  2287.  
  2288. Synopsis
  2289.  
  2290.      #include <recio.h>
  2291.      void rcputui(REC *rp, size_t begcol, size_t endcol,
  2292.                   unsigned int number);
  2293.  
  2294. Description
  2295.  
  2296. The rcputui function writes an unsigned integral number from column begcol to
  2297. column endcol of the output record stream pointed to by rp.
  2298.  
  2299. If the number is too large to fit between the columns, asterisks are printed
  2300. between the columns and the callback warning function is called.  The
  2301. warning indicator for the record stream is set.
  2302.  
  2303. If an error occurs, the error indicator for the record stream is set and
  2304. the callback error function is called.
  2305.  
  2306. Returns
  2307.  
  2308. The rcputui function returns no value.
  2309.  
  2310.  
  2311. 1.6.14 The rcputul Function
  2312.  
  2313. Synopsis
  2314.  
  2315.      #include <recio.h>
  2316.      void rcputul(REC *rp, size_t begcol, size_t endcol,
  2317.                   unsigned long number);
  2318.  
  2319. Description
  2320.  
  2321. The rcputul function writes an unsigned integral number from column begcol to
  2322. column endcol of the output record stream pointed to by rp.
  2323.  
  2324. If the number is too large to fit between the columns, asterisks are printed
  2325. between the columns and the callback warning function is called.  The
  2326. warning indicator for the record stream is set.
  2327.  
  2328. If an error occurs, the error indicator for the record stream is set and
  2329. the callback error function is called.
  2330.  
  2331. Returns
  2332.  
  2333. The rcputul function returns no value.
  2334.  
  2335.  
  2336.  
  2337. 1.7 Current Position Functions
  2338.  
  2339. 1.7.1 The rbegcolno Function
  2340.  
  2341. Synopsis
  2342.  
  2343.      #include <recio.h>
  2344.      int rbegcolno(REC *rp);
  2345.  
  2346. Description
  2347.  
  2348. The rbegcolno function gets the current setting of the first column number
  2349. in the record for the record stream pointed to by rp.
  2350.  
  2351. Returns
  2352.  
  2353. The rbegcolno function returns 0 if column numbering starts with zero or
  2354. 1 if column numbering starts with one.
  2355.  
  2356.  
  2357. 1.7.2 The rcolno Function
  2358.  
  2359. Synopsis
  2360.  
  2361.      #include <recio.h>
  2362.      size_t rcolno(REC *rp);
  2363.  
  2364. Description
  2365.  
  2366. The rcolno function gets the current column number of the current record
  2367. for the record stream pointed to by rp.
  2368.  
  2369. Returns
  2370.  
  2371. The rcolno function returns the current column number of the current record
  2372. for the record stream pointed to by rp.  The rcolno function returns zero
  2373. prior to the reading of the first record.
  2374.  
  2375.  
  2376. 1.7.3 The rflds Function
  2377.  
  2378. Synopsis
  2379.  
  2380.      #include <recio.h>
  2381.      char *rflds(REC *rp);
  2382.  
  2383. Description
  2384.  
  2385. The rflds function gets a pointer to the field buffer associated with
  2386. the record stream pointed to by rp.  The last field read from the current
  2387. record is stored in the field buffer.  The field is terminated by a
  2388. null character.
  2389.  
  2390. Returns
  2391.  
  2392. The rflds function returns a pointer to the field buffer associated with
  2393. the record stream pointed to by rp.
  2394.  
  2395.  
  2396. 1.7.4 The rfldno Function
  2397.  
  2398. Synopsis
  2399.  
  2400.      #include <recio.h>
  2401.      size_t rfldno(REC *rp);
  2402.  
  2403. Description
  2404.  
  2405. The rfldno function gets the number of fields that have been read from
  2406. the current record for the record stream pointed to by rp.
  2407.  
  2408. Returns
  2409.  
  2410. The rfldno function returns the number of fields that have been read from
  2411. the current record for the record stream pointed to by rp.
  2412.  
  2413.  
  2414. 1.7.5 The rgetfldpos Function
  2415.  
  2416. Synopsis
  2417.  
  2418.      #include <recio.h>
  2419.      void rgetfldpos(REC *rp, rpos_t &pos)
  2420.  
  2421. Description
  2422.  
  2423. The rgetfldpos function stores the current value of the field position
  2424. indicator of the current record for the input stream pointed to by rp
  2425. into the object pointed to by pos.  The value stored contains unspecified
  2426. information usable by the rsetfldpos function to set the field position of
  2427. the current record to the same position as when the rgetfldpos function
  2428. was called.
  2429.  
  2430. If an error occurs, the error indicator for the record stream is set, and
  2431. the callback error function is called.
  2432.  
  2433. Returns
  2434.  
  2435. The rgetfldpos function returns no value.
  2436.  
  2437.  
  2438. 1.7.6 The rnames Function
  2439.  
  2440. Synopsis
  2441.  
  2442.      #include <recio.h>
  2443.      char *rnames(REC *rp);
  2444.  
  2445. Description
  2446.  
  2447. The rnames function gets a pointer to the name of the file associated
  2448. with the record stream pointed to by rp.
  2449.  
  2450. Returns
  2451.  
  2452. The rnames function returns a pointer to the name of the file associated
  2453. with the record stream pointed to by rp.
  2454.  
  2455.  
  2456. 1.7.7 The rgetrec Function
  2457.  
  2458. Synopsis
  2459.  
  2460.      #include <recio.h>
  2461.      char *rgetrec(REC *rp);
  2462.  
  2463. Description
  2464.  
  2465. The rgetrec function gets the next record from the record stream pointed
  2466. to by rp.  The rgetrec function increments the record number, clears the
  2467. field number to zero, resets the column number to rbegcolno(), and returns
  2468. a pointer to the record buffer.
  2469.  
  2470. Record numbering starts at one (1L).  Before the first record in a record
  2471. stream is read into the record buffer, the record number is zero.
  2472.  
  2473. Field numbering starts at one (1).  Before the first field in a record is
  2474. read into the field buffer, the field number is zero.
  2475.  
  2476. Column numbering starts at either zero or one, depending on the setting of
  2477. the rsetbegcolno function.  Column numbering defaults to zero.
  2478.  
  2479. If an error occurs, the error indicator for the record stream is set,
  2480. the callback error function is called, and the rgetrec
  2481. function returns a null pointer.
  2482.  
  2483. If the end-of-file is reached, the end-of-file indicator for the record
  2484. stream is set and the rgetrec function returns a null pointer.
  2485.  
  2486. Returns
  2487.  
  2488. The rgetrec function returns a pointer to the record buffer if the next
  2489. record was successfully read.  A null pointer is returned on either
  2490. error or end-of-file.
  2491.  
  2492.  
  2493. 1.7.8 The rnumfld Function
  2494.  
  2495. Synopsis
  2496.  
  2497.      #include <recio.h>
  2498.      unsigned int rnumfld(REC *rp);
  2499.  
  2500. Description
  2501.  
  2502. The rnumfld function gets the number of fields in the current record for
  2503. the input record stream pointed to by rp.
  2504.  
  2505. If an error occurs, the error indicator for the record stream is set, and
  2506. the callback error function is called.
  2507.  
  2508. Returns
  2509.  
  2510. The rnumfld function returns the number of fields in the current record.
  2511.  
  2512.  
  2513. 1.7.9 The rputrec Function
  2514.  
  2515. Synopsis
  2516.  
  2517.      #include <recio.h>
  2518.      void rputrec(REC *rp);
  2519.  
  2520. Description
  2521.  
  2522. The rputrec function writes the end-of-record newline character to the output
  2523. record stream pointed to by rp.  The rputrec function increments the record
  2524. number, clears the field number to zero, resets the column number to either
  2525. zero or one, depending on the setting of the rsetbegcolno function.
  2526.  
  2527. Record numbering starts at one (1L).  Before the first record in a record
  2528. stream is written, the record number is zero.
  2529.  
  2530. Field numbering starts at one (1).  Before the first field in a record is
  2531. written, the field number is zero.
  2532.  
  2533. Column numbering starts at either zero or one, depending on the setting of
  2534. the rsetbegcolno function.  Column numbering defaults to zero.
  2535.  
  2536. If an error occurs, the error indicator for the record stream is set, and
  2537. the callback error function is called.
  2538.  
  2539. Returns
  2540.  
  2541. The rputrec function returns no value.
  2542.  
  2543.  
  2544. 1.7.10 The rrecs Function
  2545.  
  2546. Synopsis
  2547.  
  2548.      #include <recio.h>
  2549.      char *rrecs(REC *rp);
  2550.  
  2551. Description
  2552.  
  2553. The rrecs function gets a pointer to the record buffer associated with
  2554. the record stream pointed to by rp.  The current record is stored in the
  2555. record buffer.  The record is terminated by a null character.
  2556.  
  2557. Returns
  2558.  
  2559. The rrecs function returns a pointer to the record buffer associated with
  2560. the record stream pointed to by rp.
  2561.  
  2562.  
  2563. 1.7.11 The rrecno Function
  2564.  
  2565. Synopsis
  2566.  
  2567.      #include <recio.h>
  2568.      long rrecno(REC *rp);
  2569.  
  2570. Description
  2571.  
  2572. The rrecno function gets the number of records that have been read from
  2573. the record stream pointed to by rp.
  2574.  
  2575. Returns
  2576.  
  2577. The rrecno function returns the number of records that have been read from
  2578. the record stream pointed to by rp.
  2579.  
  2580.  
  2581. 1.7.12 The rresetrec Function
  2582.  
  2583. Synopsis
  2584.  
  2585.     #include <recio.h>
  2586.     void rresetrec(REC *rp);
  2587.  
  2588. Description
  2589.  
  2590. The rresetrec function resets the internals of the input stream pointed
  2591. to by rp such that the next use of a rget field function reads from the
  2592. beginning of the record buffer.  It has no effect on an output stream.
  2593.  
  2594. Returns
  2595.  
  2596. The rresetrec function returns no value.
  2597.  
  2598.  
  2599. 1.7.13 The rsetbegcolno Function
  2600.  
  2601. Synopsis
  2602.  
  2603.      #include <recio.h>
  2604.      void rsetbegcolno(REC *rp, int colno);
  2605.  
  2606. Description
  2607.  
  2608. The rsetbegcolno function sets the first column number colno for the record
  2609. stream pointed to by rp.  Column numbering can start at either 0 or 1.
  2610.  
  2611. If an error occurs, the error indicator for the record stream is set and
  2612. the callback error function is called.
  2613.  
  2614. Returns
  2615.  
  2616. The rsetbegcolno function returns no value.
  2617.  
  2618.  
  2619. 1.7.14 The rsetbegyr Function
  2620.  
  2621. Synopsis
  2622.  
  2623.     #include <recio.h>
  2624.     void rsetbegyr(int year)
  2625.  
  2626. Description
  2627.  
  2628. The rsetbegyr function sets the beginning 4-digit year of the range of
  2629. the 2-digit time format %y (see section 1.3.16).  If not this function
  2630. is not used, the beginning year is controlled by the value of the constant
  2631. macro RECBEGYR.
  2632.  
  2633. Returns
  2634.  
  2635. The rsetbegyr function returns no value.
  2636.  
  2637.  
  2638. 1.7.15 The rsetfldpos Function
  2639.  
  2640. Synopsis
  2641.  
  2642.     #include <recio.h>
  2643.     void rsetfldpos(REC *rp, rpos_t &pos);
  2644.  
  2645. Description
  2646.  
  2647. The rsetfldpos function sets the field position indicator of the current
  2648. record of the input stream pointed to by rp according to the value of the
  2649. object pointed to by pos, which is a value obtained from an earlier call
  2650. to the rgetfldpos function on the same stream.  If the record has changed
  2651. since the earlier call to the rgetfldpos function, the behavior of this
  2652. function is implementation dependent.
  2653.  
  2654. If an error occurs, the error indicator for the record stream is set and
  2655. the callback error function is called.
  2656.  
  2657. Returns
  2658.  
  2659. The rsetfldpos function returns no value.
  2660.  
  2661.  
  2662. 1.7.16 The rsetfldstr Function
  2663.  
  2664. Synopsis
  2665.  
  2666.      #include <recio.h>
  2667.      void rsetfldstr(REC *rp, char *s);
  2668.  
  2669. Description
  2670.  
  2671. The rsetfldstr function copies the string s into the field buffer of the
  2672. record stream pointed to by rp.  Any existing string in the field buffer
  2673. is overwritten.  The field buffer size is increased, if necessary, to
  2674. accommodate the string.
  2675.  
  2676. A side effect of using the rsetfldstr function is that the error and
  2677. end-of-file indicators for the record stream are cleared (provided
  2678. rsetfldstr does not create an error).
  2679.  
  2680. If an error occurs, the error indicator for the record stream is set and
  2681. the callback error function is called.
  2682.  
  2683. Returns
  2684.  
  2685. The rsetfldstr function returns no value.
  2686.  
  2687.  
  2688. 1.7.17 The rsetrecstr Function
  2689.  
  2690. Synopsis
  2691.  
  2692.      #include <recio.h>
  2693.      void rsetrecstr(REC *rp, char *s);
  2694.  
  2695. Description
  2696.  
  2697. The rsetrecstr function copies the string s into the record buffer of the
  2698. input record stream pointed to by rp.  Any existing string in the record
  2699. buffer is overwritten.  The record buffer size is increased, if necessary,
  2700. to accommodate the string.  It has no effect on an output stream.
  2701.  
  2702. A side effect of using the rsetrecstr function is that the error and
  2703. end-of-file indicators for the record stream are cleared (provided
  2704. rsetrecstr does not create an error).
  2705.  
  2706. If an error occurs, the error indicator for the record stream is set and
  2707. the callback error function is called.
  2708.  
  2709. Returns
  2710.  
  2711. The rsetrecstr function returns no value.
  2712.  
  2713.  
  2714.  
  2715. 1.8 Error Functions
  2716.  
  2717. 1.8.1 The errno Macro
  2718.  
  2719. Synopsis
  2720.  
  2721.      #include <errno.h>
  2722.  
  2723. Description
  2724.  
  2725. The errno macro "expands to a modifiable lvalue that has type int, the
  2726. value of which is set to a positive error number by several library
  2727. functions." -Section 4.1.3 of ANSI X3.159-1989.
  2728.  
  2729.  
  2730. 1.8.2 The rclearerr Function
  2731.  
  2732. Synopsis
  2733.  
  2734.      #include <recio.h>
  2735.      void rclearerr(REC *rp);
  2736.  
  2737. Description
  2738.  
  2739. The rclearerr function clears the end-of-file and error indicators for
  2740. the record stream pointed to by rp.
  2741.  
  2742. Returns
  2743.  
  2744. The rclearerr function returns no value.
  2745.  
  2746.  
  2747. 1.8.3 The rcxtno Function
  2748.  
  2749. Synopsis
  2750.  
  2751.      #include <recio.h>
  2752.      int rcxtno(REC *rp);
  2753.  
  2754. Description
  2755.  
  2756. The rcxtno function gets the context number from the record stream pointed
  2757. to by rp.  Context numbers can be assigned to a record stream using the
  2758. rsetcxtno function.  A zero context number indicates that the context
  2759. number has not been assigned.  The recin, recout, recerr, and recprn streams
  2760. return the macro values of RECIN, RECOUT, RECERR, and RECPRN respectively.
  2761.  
  2762. Returns
  2763.  
  2764. The rcxtno function returns the context number from the record stream pointed
  2765. to by rp.
  2766.  
  2767.  
  2768. 1.8.4 The reof Function
  2769.  
  2770. Synopsis
  2771.  
  2772.      #include <recio.h>
  2773.      int reof(REC *rp);
  2774.  
  2775. Description
  2776.  
  2777. The reof function tests the end-of-file indicator for the record stream
  2778. pointed to by rp.
  2779.  
  2780. Returns
  2781.  
  2782. The reof function returns nonzero if and only if the end-of-file indicator
  2783. is set for the record stream pointed to by rp.
  2784.  
  2785.  
  2786. 1.8.5 The rerror Function
  2787.  
  2788. Synopsis
  2789.  
  2790.      #include <recio.h>
  2791.      int rerror(REC *rp);
  2792.  
  2793. Description
  2794.  
  2795. The rerror function tests the error indicator for the record stream
  2796. pointed to by rp.
  2797.  
  2798. Returns
  2799.  
  2800. The rerror function returns nonzero if and only if the error indicator
  2801. is set for the record stream pointed to by rp.
  2802.  
  2803.  
  2804. 1.8.6 The rerrstr Function
  2805.  
  2806. Synopsis
  2807.  
  2808.      #include <recio.h>
  2809.      char *rerrstr(REC *rp);
  2810.  
  2811. Description
  2812.  
  2813. The rerrstr function gets the error message for the record stream pointed
  2814. to by rp.  The text of the error message is implementation dependent.
  2815.  
  2816. Returns
  2817.  
  2818. The rerrstr function returns a pointer to a string containing an error
  2819. message.
  2820.  
  2821.  
  2822. 1.8.7 The risvalid Function
  2823.  
  2824. Synopsis
  2825.  
  2826.      #include <recio.h>
  2827.      int risvalid(REC *rp);
  2828.  
  2829. Description
  2830.  
  2831. The risvalid function tests if rp is a valid pointer to a record stream.
  2832.  
  2833. Returns
  2834.  
  2835. The risvalid function returns a nonzero value if and only if rp is a
  2836. valid pointer to an open record stream.
  2837.  
  2838.  
  2839. 1.8.8 The rsetcxtno Function
  2840.  
  2841. Synopsis
  2842.  
  2843.      #include <recio.h>
  2844.      void rsetcxtno(REC *rp, int cxtno);
  2845.  
  2846. Description
  2847.  
  2848. The rsetcxtno function sets the context number cxtno on the record stream
  2849. pointed to by rp.  Assigning a context number allows a file format to be more
  2850. easily identified in the callback error function.  Negative context numbers
  2851. are reserved; a zero context number indicates an that the context has not
  2852. been assigned.  A macro values RECIN, RECOUT, RECERR, and RECPRN are
  2853. preassigned to the recin, recout, recerr, and recprn streams respectively.
  2854.  
  2855.  
  2856. Returns
  2857.  
  2858. The rsetcxtno returns no value.
  2859.  
  2860.  
  2861. 1.8.9 The rseterr Function
  2862.  
  2863. Synopsis
  2864.  
  2865.      #include <recio.h>
  2866.      int rseterr(REC *rp, int errnum);
  2867.  
  2868. Description
  2869.  
  2870. The rseterr function sets the global error number errno to the value of
  2871. errnum if the record stream pointed to by rp is null.  If rp points to
  2872. a valid record stream, the rseterr function sets the error indicator on
  2873. the record stream.  The callback error function is called.  If the record
  2874. stream error indicator is already set on entry to the rseterr function,
  2875. the rseterr function does nothing.
  2876.  
  2877. Returns
  2878.  
  2879. The rseterr function returns the error number.  If the callback error
  2880. function corrects the error and clears the error number, the function
  2881. returns zero.
  2882.  
  2883.  
  2884. 1.8.10 The rseterrfn Function
  2885.  
  2886. Synopsis
  2887.  
  2888.      #include <recio.h>
  2889.      void rseterrfn(void(*rerrfn)(REC *rp));
  2890.  
  2891. Description
  2892.  
  2893. The rseterrfn function registers the callback error function rerrfn for the
  2894. record stream pointed to by rp.
  2895.  
  2896. Returns
  2897.  
  2898. The rseterrfn function returns no value.  The callback error function rerrfn
  2899. returns no value.
  2900.  
  2901.  
  2902. 1.8.11 The rstrerror Function
  2903.  
  2904. Synopsis
  2905.  
  2906.      #include <recio.h>
  2907.      char *rstrerror(int errnum);
  2908.  
  2909. Description
  2910.  
  2911. The rstrerror function maps the error number in errnum to an error
  2912. message string.  The error number and the text of the error message
  2913. are implementation dependent.  (To map errno to an error string, use
  2914. the strerror function.)
  2915.  
  2916. Returns
  2917.  
  2918. The rstrerror function returns a pointer to a string containing an
  2919. error message.
  2920.  
  2921.  
  2922.  
  2923. 1.9 Warning Functions
  2924.  
  2925. 1.9.1 The rclearwarn Function
  2926.  
  2927. Synopsis
  2928.  
  2929.      #include <recio.h>
  2930.      void rclearwarn(REC *rp);
  2931.  
  2932. Description
  2933.  
  2934. The rclearwarn function clears the warning indicator for the record stream
  2935. pointed to by rp.
  2936.  
  2937. Returns
  2938.  
  2939. The rclearwarn function returns no value.
  2940.  
  2941.  
  2942. 1.9.2 The rsetwarn Function
  2943.  
  2944. Synopsis
  2945.  
  2946.      #include <recio.h>
  2947.      int rsetwarn(REC *rp, int warnum);
  2948.  
  2949. Description
  2950.  
  2951. The rsetwarn function sets the warning indicator on the record stream
  2952. pointed to by rp.  The callback warning function is called (if registered).
  2953.  
  2954. Returns
  2955.  
  2956. The rsetwarn function returns the warning number.  If the callback warning
  2957. function modifies the warning number, the function returns the modified
  2958. warning number.
  2959.  
  2960.  
  2961. 1.9.3 The rsetwarnfn Function
  2962.  
  2963. Synopsis
  2964.  
  2965.      #include <recio.h>
  2966.      void rsetwarnfn(void(*rwarnfn)(REC *rp));
  2967.  
  2968. Description
  2969.  
  2970. The rsetwarnfn function registers the callback warning function rwarnfn for
  2971. the record stream pointed to by rp.
  2972.  
  2973. Returns
  2974.  
  2975. The rsetwarnfn function returns no value.  The callback warning function
  2976. rwarnfn returns no value.
  2977.  
  2978.  
  2979. 1.9.4 The rstrwarning Function
  2980.  
  2981. Synopsis
  2982.  
  2983.      #include <recio.h>
  2984.      char *rstrwarning(int warnum);
  2985.  
  2986. Description
  2987.  
  2988. The rstrwarning function maps the warning number warnum to an warning
  2989. message string.  The warning number and the text of the warning message
  2990. are implementation dependent.
  2991.  
  2992. Returns
  2993.  
  2994. The rstrwarning function returns a pointer to a string containing an
  2995. warning message.
  2996.  
  2997.  
  2998. 1.9.5 The rwarning Function
  2999.  
  3000. Synopsis
  3001.  
  3002.      #include <recio.h>
  3003.      int rwarning(REC *rp);
  3004.  
  3005. Description
  3006.  
  3007. The rwarning function tests the warning indicator for the record stream
  3008. pointed to by rp.
  3009.  
  3010. Returns
  3011.  
  3012. The rwarning function returns nonzero if and only if the warning indicator
  3013. is set for the record stream pointed to by rp.
  3014.  
  3015.  
  3016. 1.9.6 The rwarnstr Function
  3017.  
  3018. Synopsis
  3019.  
  3020.      #include <recio.h>
  3021.      char *rwarnstr(REC *rp);
  3022.  
  3023. Description
  3024.  
  3025. The rwarnstr function gets the warning message for the record stream pointed
  3026. to by rp.  The text of the warning message is implementation dependent.
  3027.  
  3028. Returns
  3029.  
  3030. The rwarnstr function returns a pointer to a string containing an warning
  3031. message.
  3032.  
  3033.  
  3034.  
  3035. 2.0 PORTABILITY ISSUES
  3036.  
  3037. The first six characters of many recio functions are common to other 
  3038. recio functions.  Ref 3.1.2 of ANSI X3.159-1989. 
  3039.  
  3040. References are not implemented in ANSI X3.159-1989, but are part of C++.
  3041. They can be reasonably simulated in C (for functions that don't have a
  3042. variable number of arguments) by use of a macro that inserts the & into the
  3043. call.  (1.7.5, 1.7.15)
  3044.  
  3045.  
  3046.  
  3047. 3.0 REFERENCES
  3048.  
  3049. 1. ANSI X3.159-1989.  American National Standard for Information Systems -
  3050.    Programming Language - C.  American National Standards Institute,
  3051.    11 West 42nd Street, New York, NY 10036, 1990.
  3052.  
  3053.  
  3054. 4.0 INDEX
  3055.  
  3056. errno macro ............ 1.8.1
  3057. FLDBUFSIZ macro ........ 1.1.3, 1.2.4
  3058. rbegcolno function ..... 1.7.1, 1.7.7
  3059. rbgeti function ........ 1.3.1
  3060. rbgetl function ........ 1.3.2
  3061. rbgetui function ....... 1.3.3
  3062. rbgetul function ....... 1.3.4
  3063. rbputi function ........ 1.4.1
  3064. rbputl function ........ 1.4.2
  3065. rbputui function ....... 1.4.3
  3066. rbputul function ....... 1.4.4
  3067. rcbgeti function ....... 1.5.1
  3068. rcbgetl function ....... 1.5.2
  3069. rcbgetui function ...... 1.5.3
  3070. rcbgetul function ...... 1.5.4
  3071. rcbputi function ....... 1.6.1
  3072. rcbputl function ....... 1.6.2
  3073. rcbputui function ...... 1.6.3
  3074. rcbputul function ...... 1.6.4
  3075. rcgetc function ........ 1.5.5
  3076. rcgetd function ........ 1.5.6
  3077. rcgetf function ........ 1.5.7
  3078. rcgeti function ........ 1.5.8
  3079. rcgetl function ........ 1.5.9
  3080. rcgets function ........ 1.5.10
  3081. rcgett function ........ 1.5.11
  3082. rcgettm function ....... 1.5.12
  3083. rcgetui function ....... 1.5.13
  3084. rcgetul function ....... 1.5.14
  3085. rclearerr function ..... 1.8.2
  3086. rclearwarn function .... 1.9.1
  3087. rclose function ........ 1.2.1
  3088. rcloseall function ..... 1.2.2
  3089. rcolno function ........ 1.7.2
  3090. rcputc function ........ 1.6.5
  3091. rcputd function ........ 1.6.6
  3092. rcputf function ........ 1.6.7
  3093. rcputi function ........ 1.6.8
  3094. rcputl function ........ 1.6.9
  3095. rcputs function ........ 1.6.10
  3096. rcputt function ........ 1.6.11
  3097. rcputtm function ....... 1.6.12
  3098. rcputui function ....... 1.6.13
  3099. rcputul function ....... 1.6.14
  3100. rcxtno function ........ 1.8.3
  3101. REC object ............. 1.1.2
  3102. recin expression ....... 1.1.4
  3103. RECBUFSIZ macro ........ 1.1.3, 1.2.5
  3104. RECFLDCH macro ......... 1.1.3, 1.3.15
  3105. RECTXTCH macro ......... 1.1.3, 1.3.17
  3106. reof function .......... 1.8.4
  3107. rerror function ........ 1.8.5
  3108. rerrstr function ....... 1.8.6
  3109. rflds function ......... 1.7.3
  3110. rfldno function ........ 1.7.4
  3111. rgetc function ......... 1.3.5
  3112. rgetd function ......... 1.3.6
  3113. rgetf function ......... 1.3.7
  3114. rgetfldpos function .... 1.7.5
  3115. rgeti function ......... 1.3.8
  3116. rgetl function ......... 1.3.9
  3117. rgetrec function ....... 1.7.7
  3118. rgets function ......... 1.3.10
  3119. rgett function ......... 1.3.11
  3120. rgettm function ........ 1.3.12
  3121. rgetui function ........ 1.3.13
  3122. rgetul function ........ 1.3.14
  3123. rgotofld function ...... 1.3.15
  3124. ristxtfld function ..... 1.3.16
  3125. risvalid function ...... 1.8.7
  3126. rnames function ........ 1.7.6
  3127. rnbgeti function ....... 1.3.17
  3128. rnbgetl function ....... 1.3.18
  3129. rnbgetui function ...... 1.3.19
  3130. rnbgetul function ...... 1.3.20
  3131. rngetc function ........ 1.3.21
  3132. rngetd function ........ 1.3.22
  3133. rngetf function ........ 1.3.23
  3134. rngeti function ........ 1.3.24
  3135. rngetl function ........ 1.3.25
  3136. rngets function ........ 1.3.26
  3137. rngett function ........ 1.3.27
  3138. rngettm function ....... 1.3.28
  3139. rngetui function ....... 1.3.29
  3140. rngetul function ....... 1.3.30
  3141. rnumfld function ....... 1.7.8
  3142. ropen function  ........ 1.2.3
  3143. ROPEN_MAX macro ........ 1.1.3
  3144. rputc function ......... 1.4.5
  3145. rputd function ......... 1.4.6
  3146. rputf function ......... 1.4.7
  3147. rputi function ......... 1.4.8
  3148. rputl function ......... 1.4.9
  3149. rputrec function ....... 1.7.9
  3150. rputs function ......... 1.4.10
  3151. rputt function ......... 1.4.11
  3152. rputtm function ........ 1.4.12
  3153. rputui function ........ 1.4.13
  3154. rputul function ........ 1.4.14
  3155. rrecs function ......... 1.7.10
  3156. rrecno function ........ 1.7.11
  3157. rresetstr function ..... 1.7.12
  3158. rsetbegcolno function .. 1.7.7, 1.7.13
  3159. rsetbegyr .............. 1.7.14
  3160. rsetcxtno function ..... 1.8.8
  3161. rseterr function ....... 1.8.9
  3162. rseterrfn function ..... 1.8.10
  3163. rsetfldch function ..... 1.3.31
  3164. rsetfldpos function .... 1.7.15
  3165. rsetfldsiz function .... 1.2.4
  3166. rsetfldstr function .... 1.7.16
  3167. rsetrecsiz function .... 1.2.5
  3168. rsetrecstr function .... 1.7.17
  3169. rsettmfmt function ..... 1.3.32
  3170. rsettxtch function ..... 1.3.33
  3171. rsetwarn function ...... 1.9.2
  3172. rsetwarnfn function .... 1.9.3
  3173. rskipfld function  ..... 1.3.34
  3174. rskipnfld function ..... 1.3.35
  3175. rstrerror function ..... 1.8.11
  3176. rstrwarning function ... 1.9.4
  3177. rwarning function ...... 1.9.5
  3178. rwarnstr function ...... 1.9.6
  3179.